See999 4 jaren geleden
bovenliggende
commit
d27430d876

+ 2 - 2
config/dev.env.js Bestand weergeven

@@ -6,8 +6,8 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9
-  // BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
9
+  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
+  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11 11
   // BASE_API: '"http://localhost:9531"',
12 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 13
   SRCM_HOST: '"http://test1.sgjyun.com"',

+ 2 - 1
config/index.js Bestand weergeven

@@ -12,7 +12,8 @@ module.exports = {
12 12
     assetsPublicPath: '/',
13 13
     proxyTable: {
14 14
       '/api': {
15
-        target: 'http://hf.sgjyun.com',//设置你调用的接口域名和端口号 别忘了加http
15
+        target: 'http://hf.sgjyun.com',//设置你调用的接口域名和端口号 别忘了加http 正式
16
+        // target: 'http://hf.szjkhd.com',//设置你调用的接口域名和端口号 别忘了加http 测试
16 17
         changeOrigin: true,//设置true 代表跨域访问
17 18
         secure: false,  // 如果是https接口,需要配置这个参数
18 19
         pathRewrite: {

+ 15 - 0
src/api/call.js Bestand weergeven

@@ -0,0 +1,15 @@
1
+import request from '@/utils/request'
2
+
3
+export function getQueue() {
4
+  return request({
5
+    url: '/api/queue/get',
6
+    method: 'get'
7
+  })
8
+}
9
+export function changeQueue(params) {
10
+  return request({
11
+    url: '/api/queue/update',
12
+    method: 'get',
13
+    params:params
14
+  })
15
+}

+ 1 - 1
src/lang/zh.js Bestand weergeven

@@ -90,7 +90,7 @@ export default {
90 90
     patient: '患者中心',
91 91
     dialysisSolution: '透析处方',
92 92
     inspection: '检验检查',
93
-    home: '首页',
93
+    home: '透析首页',
94 94
     weight: '干体重',
95 95
     dialysisRecord: '透析记录',
96 96
     scheduling: '排班信息',

+ 2 - 1
src/views/layout/components/Navbar.vue Bestand weergeven

@@ -293,7 +293,8 @@ export default {
293 293
         if(res.data.code == 0){
294 294
           let token = res.data.data.token
295 295
           localStorage.setItem("token",token)
296
-          let http = 'wss://socket.sgjyun.com?token='
296
+          let http = 'wss://socket.sgjyun.com?token=' 
297
+          // let http = 'ws://socket.szjkhd.com?token='//测试
297 298
           console.log(this.$store.state.user.websocket)
298 299
           this.$store.state.user.websocket = new ReconnectingWebSocket(
299 300
             http + token

+ 3 - 0
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Bestand weergeven

@@ -2252,6 +2252,9 @@
2252 2252
 
2253 2253
       },
2254 2254
       getDialysisScheduleDetail() {
2255
+        if(this.$route.query.showView && this.$route.query.showView == true){
2256
+          return
2257
+        }
2255 2258
         getDialysisScheduleDetail(this.patientid, this.record_date).then(response => {
2256 2259
           if (response.data.state == 1) {
2257 2260
             var doctor_advices = response.data.data.doctor_advices

+ 6 - 0
src/xt_pages/dialysis/details/dialog/finish_dialog.vue Bestand weergeven

@@ -44,6 +44,7 @@
44 44
 </template>
45 45
 
46 46
 <script>
47
+  import axios from 'axios'
47 48
   import { finishDialysis,PostModifyFinishDialysis } from '@/api/dialysis_record'
48 49
   import { parseTime } from '@/utils'
49 50
 
@@ -211,6 +212,11 @@
211 212
             for (const key in dialysis_order) {
212 213
               this.$set(this_order, key, dialysis_order[key])
213 214
             }
215
+            let orgId = parseInt(sessionStorage.getItem("org_id"));
216
+            axios.get('/api/index/downpatient?org_id='+ orgId + '&admin_user_id='+ this.form.nurse_id + '&patient_id=' + this.patient_id).then((res) => {
217
+              console.log('res',res.data)
218
+
219
+            }) 
214 220
             this.hide()
215 221
             this.$emit('assessmentAfterDislysis', resp.data.assessmentAfterDislysis)
216 222
 

+ 265 - 2
src/xt_pages/dialysis/details/index.vue Bestand weergeven

@@ -3,6 +3,20 @@
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
       <div class="print" style="float:left;">
6
+        <el-button
7
+          v-if="queueConfig.txxqyxs == 1"
8
+          size="small"
9
+          type="primary"
10
+          @click="call"
11
+          >叫号</el-button
12
+        >
13
+        <el-button
14
+          v-if="queueConfig.txxqyxs == 1"
15
+          size="small"
16
+          type="primary"
17
+          @click="next"
18
+          >下一位</el-button
19
+        >
6 20
         <el-button
7 21
           size="small"
8 22
           type="primary"
@@ -197,7 +211,7 @@
197 211
 
198 212
 
199 213
     </div>
200
-    <div style="width:75%">
214
+    <div style="width:75%" v-show="!showView">
201 215
       <div style="margin-left:60px;color:#34495e">
202 216
         <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
203 217
         <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
@@ -499,11 +513,20 @@
499 513
         title="治疗小结"
500 514
       ></treatment-of>
501 515
       </div>
516
+    <div v-if="showView" style="text-align:center;margin: 0 auto;font-size:20px;">
517
+      <p style="margin-top:20px;">当前叫号</p>
518
+      <p style="margin-top:20px;">{{ $route.query.patient_name ? $route.query.patient_name : ""}}</p>
519
+      <p style="margin-top:20px;">签到时间:{{ $route.query.curPatientTime ? getDates($route.query.curPatientTime) : '' }}</p>
520
+      <p style="color:red;margin-top:20px;">提示:当前患者无排班,请先排班</p>
521
+
522
+    </div>
502 523
     </div>
503 524
   </div>
504 525
 </template>
505 526
 
506 527
 <script>
528
+const moment = require('moment')
529
+import axios from 'axios'
507 530
 import NavIgation from './NavIgation'
508 531
 import BasicInfor from './BasicInfor'
509 532
 import DialysisPrescription from './DialysisPrescription'
@@ -643,10 +666,19 @@ export default {
643 666
       arr: [],
644 667
       newName: '',
645 668
       newTime: '',
646
-      scheudle_mode:""
669
+      scheudle_mode:"",
670
+
671
+
672
+      showView:false,
673
+      curPatient:{},
674
+
675
+      queueConfig:{}
647 676
     }
648 677
   },
649 678
   created() {
679
+    if(this.$route.query.showView){
680
+      this.showView = this.$route.query.showView
681
+    }
650 682
     if(sessionStorage.getItem("nameActive")){
651 683
       this.activeName = sessionStorage.getItem("nameActive")
652 684
     }
@@ -680,8 +712,39 @@ export default {
680 712
       this.selected_date = selected_date.selected_date
681 713
     }
682 714
 
715
+    this.initData = {
716
+      cmd: "queue/join",
717
+      data: {type:3,page:0,size:0},
718
+    };
719
+    this.websocketSend(this.initData)
720
+
683 721
     this.getInitData()
684 722
   },
723
+  beforeMount() {
724
+    if (this.websocket) {
725
+      if (this.websocket.readyState == 1) {
726
+        console.log('执行1')
727
+        this.websocketMess();
728
+      } else {
729
+        setTimeout(() => {
730
+          console.log('执行2')
731
+          this.websocketMess();
732
+        }, 1000);
733
+      }
734
+    } else {
735
+      setTimeout(() => {
736
+        if (this.websocket) {
737
+          console.log('执行3')
738
+          this.websocketMess();
739
+        } else {
740
+          setTimeout(() => {
741
+            console.log('执行4')
742
+            this.websocketMess();
743
+          }, 1000);
744
+        }
745
+      }, 1000);
746
+    }
747
+  },
685 748
   mounted() {
686 749
     const timer = setInterval(() => {
687 750
       // this.getInitData();
@@ -691,6 +754,14 @@ export default {
691 754
     this.$once('hook:beforeDestroy', () => {
692 755
       clearInterval(timer)
693 756
     })
757
+
758
+    this.timers = setInterval(() => {
759
+      let obj = {
760
+        cmd: "queue/join",
761
+        data: {type:3,page:0,size:0},
762
+      };
763
+      this.websocketSend(obj)
764
+    }, 1000*50);
694 765
   },
695 766
   computed: {
696 767
     steps: function() {
@@ -804,6 +875,16 @@ export default {
804 875
       // return schedules
805 876
     }
806 877
   },
878
+  beforeDestroy(){
879
+    clearInterval(this.timers);  // 清除定时器
880
+    this.timers = null
881
+
882
+    let unObj = {
883
+      cmd: "queue/unjoin",
884
+      data: {type:3},
885
+    };
886
+    this.websocketSend(unObj)
887
+  },
807 888
   methods: {
808 889
     adviceFunc() {
809 890
       this.getScheduleDetail()
@@ -872,6 +953,10 @@ export default {
872 953
     getScheduleDetail: function() {
873 954
       this.loading = true
874 955
       var dateStr = parseTime(this.date, '{y}-{m}-{d}')
956
+      if(this.$route.query.showView == true){
957
+        this.loading = false
958
+        return
959
+      }
875 960
 
876 961
       this.doctor_advices = []
877 962
       getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
@@ -1562,6 +1647,184 @@ export default {
1562 1647
     refresh(){
1563 1648
       console.log('1111111')
1564 1649
       this.requestDialysisSchedules()
1650
+    },
1651
+    websocketSend(data) {
1652
+      try {
1653
+        this.websocket.send(JSON.stringify(data))
1654
+          
1655
+      } catch (error) {
1656
+        this.showError = true;
1657
+        this.showIndex = 4;
1658
+        this.errorInfo = "网络异常,请稍后退出重试!";
1659
+      }
1660
+    },
1661
+    websocketMess() {
1662
+      console.log('执行',this.websocket)
1663
+      this.websocket.onmessage = e => {
1664
+        let res = JSON.parse(e.data);
1665
+        // let res = re.data;
1666
+        console.log('res3333333333',res)
1667
+        if(res.channel == 'queue/join'){
1668
+          if(res.data.fisrtQueueInfo != null){
1669
+            if(res.data.fisrtQueueInfo.create_time){
1670
+              res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1671
+            }
1672
+          }
1673
+          this.queueConfig = res.data.queueConfig
1674
+          this.fisrtQueueInfo = res.data.fisrtQueueInfo
1675
+          let arr = res.data.patientQueueList.data
1676
+          let waitingCalledArr = []
1677
+          let calledArr = []
1678
+          arr.map(item => {
1679
+              if(item.status == 1){
1680
+                  // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
1681
+                  waitingCalledArr.push(item)
1682
+              }else if(item.status == 2){
1683
+                  // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
1684
+                  calledArr.push(item)
1685
+              }
1686
+          })
1687
+          console.log('waitingCalledArr待叫号',waitingCalledArr)
1688
+          console.log('waitingCalledArr以较好',calledArr)
1689
+          this.waitingCalled = waitingCalledArr
1690
+          this.called = calledArr
1691
+        }else if(res.channel == 'allQueueList'){
1692
+          let arr = res.data.queue_list.data
1693
+          let waitingCalledArr = []
1694
+          let calledArr = []
1695
+          arr.map(item => {
1696
+              if(item.status == 1){
1697
+                // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
1698
+                waitingCalledArr.push(item)
1699
+              }else if(item.status == 2){
1700
+                // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
1701
+                calledArr.push(item)
1702
+              }
1703
+          })
1704
+          this.waitingCalled = waitingCalledArr
1705
+          this.called = calledArr
1706
+        }else if(res.channel == 'patientCallInfo'){
1707
+          res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1708
+          this.fisrtQueueInfo = res.data.patientInfo
1709
+        }
1710
+      }
1711
+    },
1712
+    call(){
1713
+      // console.log('patient_id',patient_id)
1714
+      let org_id =  parseInt(sessionStorage.getItem("org_id"));
1715
+      let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
1716
+      axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id).then(res => {
1717
+        console.log(res)
1718
+        // let patientArr = res.data.queue_list.data
1719
+        // this.patientArr = patientArr
1720
+        // this.$emit('child-event',this.patientArr)
1721
+        if(res.data.data.patientInfo == null){
1722
+          this.$message.error('已经是最后一位了');
1723
+          return
1724
+        }
1725
+        if(res.data.code == 200){
1726
+          this.$message({
1727
+            message: res.data.msg,
1728
+            type: 'success'
1729
+          });
1730
+          this.curPatient = res.data.data.patientInfo
1731
+          let arr = []
1732
+          let newArr = []
1733
+          this.zone_schedules.map(item => {
1734
+            newArr.push(...item.schedules)
1735
+          })
1736
+          newArr.map(item => {
1737
+            arr.push(item.patient_id)
1738
+          })
1739
+          if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
1740
+            
1741
+            this.showView = false
1742
+            this.$router.push({
1743
+              path: '/dialysis/details',
1744
+              query: {
1745
+                patient_id: parseInt(res.data.data.patientInfo.patient_id),
1746
+                date: this.$route.query.date,
1747
+                patient_name: res.data.data.patientInfo.patient_name,
1748
+                mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
1749
+                curPatientTime:res.data.data.patientInfo.create_time,
1750
+                showView:false
1751
+              }
1752
+            })
1753
+            
1754
+          }else {
1755
+            
1756
+            this.showView = true
1757
+            this.$router.push({
1758
+              path: '/dialysis/details',
1759
+              query: {
1760
+                patient_id: parseInt(res.data.data.patientInfo.patient_id),
1761
+                date: this.$route.query.date,
1762
+                patient_name: res.data.data.patientInfo.patient_name,
1763
+                mode_id:this.$route.query.mode_id,
1764
+                curPatientTime:res.data.data.patientInfo.create_time,
1765
+                showView:true
1766
+              }
1767
+            })
1768
+          }
1769
+        }
1770
+      })
1771
+    },
1772
+    next(){
1773
+      console.log('patient_id',this.$route.query.date)
1774
+      let org_id =  parseInt(sessionStorage.getItem("org_id"));
1775
+      let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
1776
+      axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id).then(res => {
1777
+        console.log(res)
1778
+        if(res.data.data.patientInfo == null){
1779
+          this.$message.error('已经是最后一位了');
1780
+          return
1781
+        }
1782
+        if(res.data.code == 200){
1783
+          this.$message({
1784
+            message: res.data.msg,
1785
+            type: 'success'
1786
+          });
1787
+          this.curPatient = res.data.data.patientInfo
1788
+          let arr = []
1789
+          let newArr = []
1790
+          this.zone_schedules.map(item => {
1791
+            newArr.push(...item.schedules)
1792
+          })
1793
+          newArr.map(item => {
1794
+            arr.push(item.patient_id)
1795
+          })
1796
+          if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
1797
+            this.showView = false
1798
+            this.$router.push({
1799
+              path: '/dialysis/details',
1800
+              query: {
1801
+                patient_id: parseInt(res.data.data.patientInfo.patient_id),
1802
+                date: this.$route.query.date,
1803
+                patient_name: res.data.data.patientInfo.patient_name,
1804
+                mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
1805
+                curPatientTime:res.data.data.patientInfo.create_time,
1806
+                showView:false
1807
+              }
1808
+            })
1809
+          }else {
1810
+            this.showView = true
1811
+            this.$router.push({
1812
+              path: '/dialysis/details',
1813
+              query: {
1814
+                patient_id: parseInt(res.data.data.patientInfo.patient_id),
1815
+                date: this.$route.query.date,
1816
+                patient_name: res.data.data.patientInfo.patient_name,
1817
+                mode_id:this.$route.query.mode_id,
1818
+                curPatientTime:res.data.data.patientInfo.create_time,
1819
+                showView:true
1820
+              }
1821
+            })
1822
+          }
1823
+        }
1824
+      })
1825
+    },
1826
+    getDates(time){
1827
+      return moment(time * 1000).format('HH:mm:ss')
1565 1828
     }
1566 1829
   }
1567 1830
 }

+ 287 - 10
src/xt_pages/dialysis/schedualPatient.vue Bestand weergeven

@@ -39,6 +39,13 @@
39 39
           </li>
40 40
         </ul>
41 41
       </div>
42
+      <!-- <label class="title"><span class="name">叫号状态</span> : </label>
43
+      <div class="time ">
44
+        <ul class="">
45
+          <li v-for="option in call_state" :key="option.value" @click="handleCallChange(option.value)" :class="callVal == option.value ? 'active' : ''" >{{option.label}}
46
+          </li>
47
+        </ul>
48
+      </div> -->
42 49
     </div>
43 50
     <div class="cell clearfix">
44 51
       <label class="title"><span class="name">治疗状态</span> : </label>
@@ -72,15 +79,24 @@
72 79
       <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
73 80
       <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
74 81
     </div>
75
-
76
-    <div class="PatientArea">
77
-      <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix">
78
-        <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
79
-        <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;line-height:30px;">{{zone_schedule.zone_name}}</div>
80
-        <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' style="flex:1"></patient-box>
82
+    <div style="display:flex;justify-content: space-between;">
83
+      <div :class="queueConfig.txglsyxs != 1 ? 'PatientArea' : 'PatientArea smallWidth'">
84
+        <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix">
85
+          <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
86
+          <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;line-height:30px;">{{zone_schedule.zone_name}}</div>
87
+          <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' style="flex:1"></patient-box>
88
+        </div>
89
+        <div class="NoData" v-show="filtedSchedules.length == 0">
90
+          <img src="@/assets/img/data.jpg" alt="">
91
+        </div>
81 92
       </div>
82
-      <div class="NoData" v-show="filtedSchedules.length == 0">
83
-        <img src="@/assets/img/data.jpg" alt="">
93
+      <div class="nowCalling" v-if="queueConfig.txglsyxs == 1">
94
+        <p class="nowCallingTitle">当前叫号</p>
95
+        <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
96
+        <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
97
+        <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
98
+        <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
99
+        <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
84 100
       </div>
85 101
     </div>
86 102
   </div>
@@ -88,6 +104,8 @@
88 104
 </template>
89 105
 
90 106
 <script>
107
+const moment = require('moment')
108
+import axios from 'axios'
91 109
   import PatientBox from './PatientBox'
92 110
 import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_record'
93 111
   import { parseTime } from '@/utils'
@@ -166,10 +184,26 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
166 184
           {value: 3,label: '待医嘱核对'},
167 185
         ],
168 186
         treatStateVal: 0,
169
-        allPatient:[]
187
+        allPatient:[],
188
+
189
+        //叫号
190
+        waitingCalled:[],
191
+        called:[],
192
+        fisrtQueueInfo:{},
193
+        call_state:[
194
+          {value: 0,label: '全部'},
195
+          {value: 1,label: '待叫号'},
196
+          {value: 2,label: '已叫号'},
197
+        ],
198
+        callVal: 0,
199
+        timers:null,
200
+        queueConfig:{}
170 201
       }
171 202
     },
172 203
     computed: {
204
+      websocket() {
205
+        return this.$store.state.user.websocket;
206
+      },
173 207
       filtedSchedules: function() {
174 208
         var search_keyword = this.search_keyword
175 209
         if (search_keyword.length > 0) {
@@ -265,10 +299,44 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
265 299
       if(selected_date.selected_date){
266 300
         this.selected_date = selected_date.selected_date
267 301
       }
302
+      this.initData = {
303
+        cmd: "queue/join",
304
+        data: {type:3,page:0,size:0},
305
+      };
306
+      this.websocketSend(this.initData)
307
+      
268 308
 
269 309
       this.getInitData()
270 310
 
271
-    }, mounted() {
311
+
312
+
313
+    },
314
+    beforeMount() {
315
+      if (this.websocket) {
316
+            if (this.websocket.readyState == 1) {
317
+                console.log('执行1')
318
+                this.websocketMess();
319
+            } else {
320
+                setTimeout(() => {
321
+                    console.log('执行2')
322
+                    this.websocketMess();
323
+                }, 1000);
324
+            }
325
+        } else {
326
+            setTimeout(() => {
327
+                if (this.websocket) {
328
+                    console.log('执行3')
329
+                    this.websocketMess();
330
+                } else {
331
+                    setTimeout(() => {
332
+                        console.log('执行4')
333
+                        this.websocketMess();
334
+                    }, 1000);
335
+                }
336
+            }, 1000);
337
+        }
338
+    },
339
+    mounted() {
272 340
       const timer = setInterval(() => {
273 341
         // this.getInitData();
274 342
         this.requestDialysisSchedules()
@@ -277,8 +345,140 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
277 345
       this.$once('hook:beforeDestroy', () => {
278 346
         clearInterval(timer)
279 347
       })
348
+
349
+      this.timers = setInterval(() => {
350
+        let obj = {
351
+            cmd: "queue/join",
352
+            data: {type:3,page:0,size:0},
353
+        };
354
+        this.websocketSend(obj)
355
+      }, 1000*50);
356
+    },
357
+    beforeDestroy(){
358
+      clearInterval(this.timers);  // 清除定时器
359
+      this.timers = null
360
+
361
+      let unObj = {
362
+          cmd: "queue/unjoin",
363
+          data: {type:3},
364
+      };
365
+      this.websocketSend(unObj)
280 366
     },
281 367
     methods: {
368
+      websocketSend(data) {
369
+        try {
370
+          this.websocket.send(JSON.stringify(data))
371
+            
372
+        } catch (error) {
373
+          this.showError = true;
374
+          this.showIndex = 4;
375
+          this.errorInfo = "网络异常,请稍后退出重试!";
376
+        }
377
+      },
378
+      websocketMess() {
379
+        console.log('执行',this.websocket)
380
+        this.websocket.onmessage = e => {
381
+          let res = JSON.parse(e.data);
382
+          // let res = re.data;
383
+          console.log('res3333333333',res)
384
+          if(res.channel == 'queue/join'){
385
+            if(res.data.fisrtQueueInfo != null){
386
+              if(res.data.fisrtQueueInfo.create_time){
387
+                res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
388
+              }
389
+            }
390
+            this.queueConfig = res.data.queueConfig
391
+            this.fisrtQueueInfo = res.data.fisrtQueueInfo
392
+            let arr = res.data.patientQueueList.data
393
+            let waitingCalledArr = []
394
+            let calledArr = []
395
+            arr.map(item => {
396
+                if(item.status == 1){
397
+                    // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
398
+                    waitingCalledArr.push(item)
399
+                }else if(item.status == 2){
400
+                    // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
401
+                    calledArr.push(item)
402
+                }
403
+            })
404
+            console.log('waitingCalledArr待叫号',waitingCalledArr)
405
+            console.log('waitingCalledArr以较好',calledArr)
406
+            this.waitingCalled = waitingCalledArr
407
+            this.called = calledArr
408
+          }else if(res.channel == 'allQueueList'){
409
+            let arr = res.data.queue_list.data
410
+            let waitingCalledArr = []
411
+            let calledArr = []
412
+            arr.map(item => {
413
+                if(item.status == 1){
414
+                  // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
415
+                  waitingCalledArr.push(item)
416
+                }else if(item.status == 2){
417
+                  // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
418
+                  calledArr.push(item)
419
+                }
420
+            })
421
+            this.waitingCalled = waitingCalledArr
422
+            this.called = calledArr
423
+          }else if(res.channel == 'patientCallInfo'){
424
+            res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
425
+            this.fisrtQueueInfo = res.data.patientInfo
426
+          }
427
+        }
428
+      },
429
+      call(patient_id){
430
+        if(patient_id == undefined || patient_id == ""){
431
+          this.$message.error('已经是最后一位了');
432
+          return
433
+        }
434
+        console.log('patient_id',patient_id)
435
+        let org_id =  parseInt(sessionStorage.getItem("org_id"));
436
+        let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
437
+        axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
438
+            console.log(res)
439
+            // let patientArr = res.data.queue_list.data
440
+            // this.patientArr = patientArr
441
+            // this.$emit('child-event',this.patientArr)
442
+            if(res.data.code == 200){
443
+                this.$message({
444
+                    message: res.data.msg,
445
+                    type: 'success'
446
+                });
447
+            }
448
+        })
449
+      },
450
+      next(patient_id){
451
+          if(patient_id == undefined || patient_id == ""){
452
+            this.$message.error('已经是最后一位了');
453
+            return
454
+          }
455
+          console.log('patient_id',patient_id)
456
+          let org_id =  parseInt(sessionStorage.getItem("org_id"));
457
+          let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
458
+          axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
459
+              console.log(res)
460
+              // let patientArr = res.data.queue_list.data
461
+              // this.patientArr = patientArr
462
+              // this.$emit('child-event',this.patientArr)
463
+              if(res.data.data.patientInfo == null){
464
+                this.$message.error('已经是最后一位了');
465
+                return
466
+              }
467
+              if(res.data.code == 200){
468
+                  this.$message({
469
+                      message: res.data.msg,
470
+                      type: 'success'
471
+                  });
472
+              }
473
+              
474
+          })
475
+      },
476
+      handleCallChange: function(index) {
477
+        this.callVal = index
478
+        // this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
479
+        this.search_keyword = this.search_input = ''
480
+        this.getData()
481
+      },
282 482
       // handletimeType: function(index) {
283 483
       //   this.schedule_type_selected = index
284 484
       //   this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
@@ -416,6 +616,11 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
416 616
         this.getData()
417 617
       },
418 618
       getData(){
619
+        let newobj = {
620
+          cmd: "queue/join",
621
+          data: {type:3,page:0,size:0},
622
+        };
623
+        this.websocketSend(newobj)
419 624
 
420 625
         let patientArr = []
421 626
         patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
@@ -590,6 +795,52 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
590 795
         }else{
591 796
           this.allPatient = arr4
592 797
         }
798
+        // let arr5 = JSON.parse(JSON.stringify(this.allPatient))
799
+
800
+        
801
+        // if(this.callVal == 1){
802
+        //   let arr = []
803
+        //   arr = JSON.parse(JSON.stringify(arr5))
804
+        //   for (let i = 0; i < arr.length; i++) {
805
+        //     for (let j = 0; j < arr[i].schedules.length; j++) {
806
+        //       // console.log(this.waitingCalled)
807
+        //       let a = []
808
+        //       this.waitingCalled.map(item => {
809
+        //         a.push(parseInt(item.patient_id))
810
+        //       })
811
+        //       console.log(6666666666,a)
812
+        //       console.log(2222,arr[i].schedules[j].patient_id)
813
+        //       if (a.indexOf(arr[i].schedules[j].patient_id) == -1) {
814
+        //         // 删除元素后改变i的值
815
+        //         console.log('下标值',a.indexOf(arr[i].schedules[j].patient_id))
816
+        //         arr[i].schedules.splice(j--, 1);
817
+        //       }
818
+        //     }
819
+        //   }
820
+        //   console.log('arr111111111111',arr)
821
+        // }else if(this.callVal == 2) {
822
+        //   let arr = []
823
+        //   arr = JSON.parse(JSON.stringify(arr5))
824
+        //   for (let i = 0; i < arr.length; i++) {
825
+        //     for (let j = 0; j < arr[i].schedules.length; j++) {
826
+        //       // console.log(this.waitingCalled)
827
+        //       let a = []
828
+        //       this.called.map(item => {
829
+        //         a.push(parseInt(item.patient_id))
830
+        //       })
831
+        //       console.log(6666666666,a)
832
+        //       console.log(2222,arr[i].schedules[j].patient_id)
833
+        //       if (a.indexOf(arr[i].schedules[j].patient_id) == -1) {
834
+        //         // 删除元素后改变i的值
835
+        //         console.log('下标值',a.indexOf(arr[i].schedules[j].patient_id))
836
+        //         arr[i].schedules.splice(j--, 1);
837
+        //       }
838
+        //     }
839
+        //   }
840
+        //   console.log('arr222222222',arr)
841
+        // }
842
+        
843
+        
593 844
       },
594 845
       compare(property){
595 846
         return function(a,b){
@@ -666,5 +917,31 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
666 917
       }
667 918
     }
668 919
   }
920
+  .smallWidth{
921
+    width:88%;
922
+  }
923
+  .nowCalling{
924
+    height: 313px;
925
+    border: 1px solid #e5e5ee;
926
+    // flex: 1;
927
+    width: 12%;
928
+    text-align: center;
929
+    .nowCallingTitle{
930
+        font-size: 20px;
931
+        font-weight: 600;
932
+        margin-top: 20px;
933
+        text-align: center;
934
+    }
935
+    .nowCallingName{
936
+        color: #338AFB;
937
+        font-size: 18px;
938
+        margin-top: 10px;
939
+        font-weight: 600;
940
+    }
941
+    .nowCallingTime{
942
+        font-size: 16px;
943
+        margin-top: 30px;
944
+    }
945
+}
669 946
 </style>
670 947
 

+ 76 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderFourteen.vue Bestand weergeven

@@ -265,6 +265,24 @@
265 265
                         &nbsp;
266 266
                       </div>
267 267
                     </td>
268
+                    <td width="50">方向:</td>
269
+                    <td width="130">
270
+                      <div>
271
+                        <label-box :isChecked="predialysis.puncture_way.indexOf('顺穿') > -1 ? true : false" showValue="顺穿"></label-box>
272
+                        &nbsp;
273
+                        <label-box :isChecked="predialysis.puncture_way.indexOf('反穿') > -1 ? true : false" showValue="反穿"></label-box>
274
+                        &nbsp;
275
+                      </div>
276
+                    </td>
277
+                    <td width="50">导管:</td>
278
+                    <td width="130">
279
+                      <div>
280
+                        <label-box :isChecked="predialysis.catheter.indexOf('通畅') > -1 ? true : false" showValue="通畅"></label-box>
281
+                        &nbsp;
282
+                        <label-box :isChecked="predialysis.catheter.indexOf('对调') > -1 ? true : false" showValue="对调"></label-box>
283
+                        &nbsp;
284
+                      </div>
285
+                    </td>
268 286
 
269 287
                     <td></td>
270 288
                   </tr>
@@ -459,7 +477,7 @@
459 477
                     </td>
460 478
                     <td width="35">min</td>
461 479
                     <td width="20"></td>
462
-                    <td width="100">实际治疗时间:</td>
480
+                    <td width="100">机面治疗时间:</td>
463 481
                     <td width="40">
464 482
                       <div class="under-line">
465 483
                         &nbsp;{{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : 0 }}
@@ -740,10 +758,13 @@
740 758
             <td width="80" style="height:20px;line-height:20px">血压<br />mmHg</td>
741 759
             <td width="40" style="height:20px;line-height:20px">脉搏<br />次/分</td>
742 760
             <td width="40" style="height:20px;line-height:20px">呼吸<br />次/分</td>
761
+            <td width="60" style="height:20px;line-height:20px">动脉压<br />mmHg</td>
743 762
             <td width="60" style="height:20px;line-height:20px">静脉压<br />mmHg</td>
744 763
             <td width="60" style="height:20px;line-height:20px">跨膜压<br />mmHg</td>
745 764
             <td width="60" style="height:20px;line-height:20px">电导度<br />mS/cm</td>
746 765
             <td width="60" style="height:20px;line-height:20px">血流量<br />ml/分</td>
766
+            <td width="40" style="height:20px;line-height:20px">液温<br />℃</td>
767
+            <td width="60" style="height:20px;line-height:20px">钠浓度<br />mmol/L</td>
747 768
             <td width="">特殊记录</td>
748 769
           </tr>
749 770
 
@@ -758,10 +779,13 @@
758 779
             </td>
759 780
             <td>&nbsp;{{ monitor.pulse_frequency ? monitor.pulse_frequency : '' }}</td>
760 781
             <td>&nbsp;{{ monitor.breathing_rate ? monitor.breathing_rate : '' }}</td>
782
+            <td>&nbsp;{{ monitor.arterial_pressure ? monitor.arterial_pressure : "" }}</td>
761 783
             <td>&nbsp;{{ monitor.venous_pressure ? monitor.venous_pressure : "" }}</td>
762 784
             <td>&nbsp;{{ monitor.transmembrane_pressure ? monitor.transmembrane_pressure : "" }}</td>
763 785
             <td>&nbsp;{{ monitor.conductivity ? monitor.conductivity : "" }}</td>
764 786
             <td>&nbsp;{{ monitor.blood_flow_volume ? monitor.blood_flow_volume : "" }}</td>
787
+            <td>&nbsp;{{ monitor.dialysate_temperature ? monitor.dialysate_temperature : "" }}</td>
788
+            <td>&nbsp;{{ monitor.sodium_concentration ? monitor.sodium_concentration : "" }}</td>
765 789
             <td style="text-align:left;padding-left:10px;">
766 790
               &nbsp;{{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{ monitor.result }}
767 791
             </td>
@@ -807,12 +831,10 @@
807 831
                       <td width="160">
808 832
                         <label-box :isChecked="afterdialysis.sealing_fluid_dispose.indexOf('常规(肝素/NS)1:1')>-1?true:false" showValue="常规(肝素/NS)1:1"></label-box>&nbsp;
809 833
                       </td>
810
-                      <td width="30"></td>
811 834
                       <td width="40">特殊:</td>
812 835
                       <td width="140">
813 836
                         <div class="under-line">&nbsp;<span v-if="afterdialysis.sealing_fluid_dispose.indexOf('特殊')>-1">{{ afterdialysis.sealing_fluid_special ? afterdialysis.sealing_fluid_special : '' }}</span></div>
814 837
                       </td>
815
-                      <td width="30"></td>
816 838
                       <td width="50">封管量:</td>
817 839
                       <td width="30">A端</td>
818 840
                       <td width="50">
@@ -824,6 +846,16 @@
824 846
                           <div class="under-line">&nbsp;{{ afterdialysis.cvc_v ? afterdialysis.cvc_v : '' }}</div>
825 847
                       </td>
826 848
                       <td width="20">ml</td>
849
+                      <td width="40">打折:</td>
850
+                      <td width="90">
851
+                        <label-box :isChecked="afterdialysis.catheter.indexOf('打折-无')>-1?true:false" showValue="无"></label-box>&nbsp;
852
+                        <label-box :isChecked="afterdialysis.catheter.indexOf('打折-有')>-1?true:false" showValue="有"></label-box>&nbsp;
853
+                      </td>
854
+                      <td width="40">吸壁:</td>
855
+                      <td width="90">
856
+                        <label-box :isChecked="afterdialysis.catheter.indexOf('吸壁-无')>-1?true:false" showValue="无"></label-box>&nbsp;
857
+                        <label-box :isChecked="afterdialysis.catheter.indexOf('吸壁-有')>-1?true:false" showValue="有"></label-box>&nbsp;
858
+                      </td>
827 859
                       <td></td>
828 860
                   </tr>
829 861
                 </tbody>
@@ -856,7 +888,28 @@
856 888
                   </tr>
857 889
                 </tbody>
858 890
               </table>
859
-
891
+              <table class="table-box">
892
+                <tbody>
893
+                  <tr>
894
+                    <td width="55">并发症:</td>
895
+                    <td width="400">
896
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('无') > -1 ? true : false" showValue="无"></label-box>&nbsp;
897
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('头晕') > -1 ? true : false" showValue="头晕"></label-box>&nbsp;
898
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('头痛') > -1 ? true : false" showValue="头痛"></label-box>&nbsp;
899
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('抽搐') > -1 ? true : false" showValue="抽搐"></label-box>&nbsp;
900
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('低血压') > -1 ? true : false" showValue="低血压"></label-box>&nbsp;
901
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('出血') > -1 ? true : false" showValue="出血"></label-box>&nbsp;
902
+                      <label-box :isChecked="afterdialysis.complication&&afterdialysis.complication.indexOf('呕吐') > -1 ? true : false" showValue="呕吐"></label-box>
903
+                    </td>
904
+                    <td width='40'>其他</td>
905
+                    <td>
906
+                      <div class="under-line" style="text-align:left;">
907
+                        &nbsp;{{ afterdialysis.complication ? getComplication(afterdialysis.complication) : '' }}
908
+                      </div>
909
+                    </td>
910
+                  </tr>
911
+                </tbody>
912
+              </table>
860 913
 
861 914
               <table class="table-box" style="margin-bottom:130px;">
862 915
                 <tbody>
@@ -1139,6 +1192,25 @@ export default {
1139 1192
     }
1140 1193
   },
1141 1194
   methods: {
1195
+    getComplication(complication){
1196
+      if(complication.indexOf(',') == -1){
1197
+        let str = complication
1198
+        if(['无','头晕','头痛','抽搐','低血压','出血','呕吐'].indexOf(str) == -1){
1199
+          return str
1200
+        }
1201
+      }else if(complication.indexOf(',') > -1){
1202
+        let str = complication
1203
+        if(['无','头晕','头痛','抽搐','低血压','出血','呕吐'].indexOf(str) == -1){
1204
+          let newStr = ''
1205
+          str.split(',').map(item => {
1206
+            if(['无','头晕','头痛','抽搐','低血压','出血','呕吐'].indexOf(item) == -1){
1207
+              newStr += item + ','
1208
+            }
1209
+          })
1210
+          return newStr.substring(0, newStr.length - 1)
1211
+        }
1212
+      }
1213
+    },
1142 1214
     getPunctureWay: function(val) {
1143 1215
       let puncture_method_name = '/'
1144 1216
       const puncture_method = getDataConfig("hemodialysis", "puncture_method")

+ 4 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue Bestand weergeven

@@ -417,7 +417,10 @@
417 417
               <td>&nbsp;{{monitor.dialysate_temperature ? monitor.dialysate_temperature : ''}}</td>
418 418
               <td>&nbsp; <span v-if="monitor.operate_time"> {{ monitor.dialysate_flow ? monitor.dialysate_flow : "" }} </span></td>
419 419
               <td>&nbsp;{{monitor.ultrafiltration_rate?monitor.ultrafiltration_rate:''}}</td>
420
-              <td> <span v-if="monitor.symptom || monitor.dispose || monitor.result"> {{ monitor.symptom + "," + monitor.dispose + "," + monitor.result }} </span>
420
+              <td>
421
+                 <span v-if="monitor.symptom"> {{ monitor.symptom }} </span>
422
+                 <span v-if="monitor.dispose"> {{ "  " + monitor.dispose }} </span>
423
+                 <span v-if="monitor.result"> {{ "  " + monitor.result }} </span>
421 424
               </td>
422 425
             </tr>
423 426
         </tbody>

+ 3 - 3
src/xt_pages/sign/calling.vue Bestand weergeven

@@ -5,7 +5,7 @@
5 5
         </div>
6 6
         <div class="app-container">
7 7
             <el-tabs v-model="activeName">
8
-                <el-tab-pane label="透前叫号" name="first">
8
+                <el-tab-pane label="接诊叫号" name="first">
9 9
                     <before-dialysis-calling v-if="activeName == 'first'"></before-dialysis-calling>
10 10
                 </el-tab-pane>
11 11
                 <el-tab-pane label="上机叫号" name="second">
@@ -13,10 +13,10 @@
13 13
                 </el-tab-pane>
14 14
                 <!-- <el-tab-pane label="诊台配置" name="third">
15 15
                     <treatment-configure></treatment-configure>
16
-                </el-tab-pane>
16
+                </el-tab-pane> -->
17 17
                 <el-tab-pane label="叫号配置" name="fourth">
18 18
                     <calling-configure></calling-configure>
19
-                </el-tab-pane> -->
19
+                </el-tab-pane>
20 20
             </el-tabs>
21 21
         </div>
22 22
     </div>

+ 66 - 10
src/xt_pages/sign/components/beforeDialysisCalling.vue Bestand weergeven

@@ -16,11 +16,11 @@
16 16
             </div>
17 17
             <div class="nowCalling" v-if="patientStateVal == 0">
18 18
                 <p class="nowCallingTitle">当前叫号</p>
19
-                <p class="nowCallingName">{{ fisrtQueueInfo.patient_name }}</p>
20
-                <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo.create_time }}</p>
21
-                <el-button type="primary" @click="call(fisrtQueueInfo.patient_id)" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
22
-                <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button>
23
-                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo.patient_id)">下一位</el-button>
19
+                <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
+                <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
+                <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
22
+                <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
23
+                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
24 24
             </div>
25 25
         </div>
26 26
     </div>
@@ -46,7 +46,9 @@ export default {
46 46
             patientStateVal: 0,
47 47
             waitingCalled:[],
48 48
             called:[],
49
-            fisrtQueueInfo:{}
49
+            fisrtQueueInfo:{},
50
+            timer:null,
51
+
50 52
         }
51 53
     },
52 54
     computed: {
@@ -62,8 +64,44 @@ export default {
62 64
         this.websocketSend(this.initData)
63 65
     },
64 66
     beforeMount() {
65
-        console.log('beforeMountbeforeMount')
66
-        this.websocketMess();
67
+        if (this.websocket) {
68
+            if (this.websocket.readyState == 1) {
69
+                this.websocketMess();
70
+            } else {
71
+                setTimeout(() => {
72
+                    this.websocketMess();
73
+                }, 1000);
74
+            }
75
+        } else {
76
+            setTimeout(() => {
77
+                if (this.websocket.readyState == 1) {
78
+                    this.websocketMess();
79
+                } else {
80
+                    setTimeout(() => {
81
+                        this.websocketMess();
82
+                    }, 1000);
83
+                }
84
+            }, 1000);
85
+        }
86
+    },
87
+    mounted(){
88
+        this.timer = setInterval(() => {
89
+            let obj = {
90
+                cmd: "queue/join",
91
+                data: {type:3,page:0,size:0},
92
+            };
93
+            this.websocketSend(obj)
94
+        }, 1000*50);
95
+    },
96
+    beforeDestroy(){
97
+        clearInterval(this.timer);  // 清除定时器
98
+        this.timer = null
99
+
100
+        let unObj = {
101
+            cmd: "queue/unjoin",
102
+            data: {type:3},
103
+        };
104
+        this.websocketSend(unObj)
67 105
     },
68 106
     methods:{
69 107
         websocketSend(data) {
@@ -77,12 +115,18 @@ export default {
77 115
             }
78 116
         },
79 117
         websocketMess() {
118
+            console.log('执行',this.websocket)
80 119
             this.websocket.onmessage = e => {
81 120
                 let res = JSON.parse(e.data);
82 121
                 // let res = re.data;
83 122
                 console.log('res3333333333',res)
84 123
                 if(res.channel == 'queue/join'){
85
-                    res.data.fisrtQueueInfo.create_time = moment(res.data.fisrtQueueInfo.create_time * 1000).format('HH:mm')
124
+                    if(res.data.fisrtQueueInfo != null){
125
+                        if(res.data.fisrtQueueInfo.create_time){
126
+                            res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
127
+                        }
128
+                        
129
+                    }
86 130
                     this.fisrtQueueInfo = res.data.fisrtQueueInfo
87 131
                     let arr = res.data.patientQueueList.data
88 132
                     let waitingCalledArr = []
@@ -116,7 +160,7 @@ export default {
116 160
                     this.waitingCalled = waitingCalledArr
117 161
                     this.called = calledArr
118 162
                 }else if(res.channel == 'patientCallInfo'){
119
-                    res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
163
+                    res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
120 164
                     this.fisrtQueueInfo = res.data.patientInfo
121 165
                 }
122 166
             }
@@ -125,6 +169,10 @@ export default {
125 169
             this.patientStateVal = index
126 170
         },
127 171
         call(patient_id){
172
+            if(patient_id == undefined || patient_id == ""){
173
+                this.$message.error('已经是最后一位了');
174
+                return
175
+            }
128 176
             console.log('patient_id',patient_id)
129 177
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
130 178
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
@@ -142,6 +190,10 @@ export default {
142 190
             })
143 191
         },
144 192
         next(patient_id){
193
+            if(patient_id == undefined || patient_id == ""){
194
+                this.$message.error('已经是最后一位了');
195
+                return
196
+            }
145 197
             console.log('patient_id',patient_id)
146 198
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
147 199
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
@@ -150,6 +202,10 @@ export default {
150 202
                 // let patientArr = res.data.queue_list.data
151 203
                 // this.patientArr = patientArr
152 204
                 // this.$emit('child-event',this.patientArr)
205
+                if(res.data.data.patientInfo == null){
206
+                    this.$message.error('已经是最后一位了');
207
+                    return
208
+                }
153 209
                 if(res.data.code == 200){
154 210
                     this.$message({
155 211
                         message: res.data.msg,

+ 1 - 1
src/xt_pages/sign/components/called.vue Bestand weergeven

@@ -16,7 +16,7 @@
16 16
                     </p>
17 17
                 </div>
18 18
             </div>
19
-            <div class="calledOneRight" v-if="index == 1" @click="call(item.patient_id)">
19
+            <div class="calledOneRight" v-if="index == 1" @click="call(item.patient_id)" style="display: none;">
20 20
                 <img src="../../../assets/img/volume.png" alt="">
21 21
             </div>
22 22
         </div>

+ 105 - 83
src/xt_pages/sign/components/callingConfigure.vue Bestand weergeven

@@ -3,126 +3,86 @@
3 3
         <div class="cell clearfix">
4 4
             就诊状态显示屏幕切换屏幕时长配置(秒) : 
5 5
             <div class="time ">
6
-                <el-input-number v-model="num" @change="handleChange" :min="1"></el-input-number>
6
+                <el-input-number v-model="form.qhsj" :min="1"></el-input-number>
7 7
             </div>
8 8
         </div>
9 9
         <div style="display:flex;">
10 10
             <div class="configureBox">
11 11
                 <div class="configureBoxTitle">接诊叫号</div>
12 12
                 <div class="configureBoxMain">
13
-                    <div style="margin-bottom:10px;">单次叫号语音播报次数:<el-input-number v-model="num" @change="handleChange" :min="1"></el-input-number></div>
14
-                    <div style="margin-bottom:10px;">叫号语音内容设置:</div>
13
+                    <div style="margin-bottom:10px;">单次叫号语音播报次数:<el-input-number v-model="form.jzdcbbcs" :min="1"></el-input-number></div>
15 14
                     <div style="margin-bottom:10px;">
16
-                        <p style="width:50px;display: inline-block;">请</p>
17
-                        <el-select style="width:140px;" v-model="type" placeholder="请选择">
18
-                            <el-option
19
-                            v-for="item in typeOptions"
20
-                            :key="item.value"
21
-                            :label="item.label"
22
-                            :value="item.value">
23
-                            </el-option>
24
-                        </el-select>
15
+                        语音播报声音:
16
+                        <el-radio-group v-model="form.jzbbsy">
17
+                            <el-radio :label="1">男生</el-radio>
18
+                            <el-radio :label="2">女生</el-radio>
19
+                        </el-radio-group>
25 20
                     </div>
26
-                    <div style="margin-bottom:10px;">
27
-                        <p style="width:50px;display: inline-block;">到</p>
28
-                        <el-select style="width:140px;" v-model="state" placeholder="请选择">
29
-                            <el-option
30
-                            v-for="item in stateOptions"
31
-                            :key="item.value"
32
-                            :label="item.label"
33
-                            :value="item.value">
34
-                            </el-option>
35
-                        </el-select>
36
-                    </div>
37
-                    <div style="margin-bottom:10px;" v-if="state == 2">
38
-                        <p style="width:50px;display: inline-block;"></p>
39
-                        <el-input style="width:200px;" v-model="input" placeholder="请输入内容"></el-input>
21
+                    <div>
22
+                        隐藏接诊叫号区域:
23
+                        <el-radio-group v-model="form.jzjhyc">
24
+                            <el-radio :label="0">是</el-radio>
25
+                            <el-radio :label="1">否</el-radio>
26
+                        </el-radio-group>
40 27
                     </div>
41
-                    <div>就诊</div>
42 28
                 </div>
43 29
                 
44 30
             </div>
45 31
             <div class="configureBox" style="border-left:none;">
46 32
                 <div class="configureBoxTitle">上机叫号</div>
47 33
                 <div class="configureBoxMain">
48
-                    <div style="margin-bottom:10px;">单次叫号语音播报次数:<el-input-number v-model="num" @change="handleChange" :min="1"></el-input-number></div>
49
-                    <div style="margin-bottom:10px;">叫号语音内容设置:</div>
50
-                    <div style="margin-bottom:10px;">
51
-                        <p style="width:50px;display: inline-block;">请</p>
52
-                        <el-select style="width:140px;" v-model="type" placeholder="请选择">
53
-                            <el-option
54
-                            v-for="item in typeOptions"
55
-                            :key="item.value"
56
-                            :label="item.label"
57
-                            :value="item.value">
58
-                            </el-option>
59
-                        </el-select>
60
-                    </div>
34
+                    <div style="margin-bottom:10px;">单次叫号语音播报次数:<el-input-number v-model="form.sjdcbbcs" :min="1"></el-input-number></div>
61 35
                     <div style="margin-bottom:10px;">
62
-                        <p style="width:50px;display: inline-block;">到</p>
63
-                        <el-select style="width:140px;" v-model="state" placeholder="请选择">
64
-                            <el-option
65
-                            v-for="item in stateOptions"
66
-                            :key="item.value"
67
-                            :label="item.label"
68
-                            :value="item.value">
69
-                            </el-option>
70
-                        </el-select>
36
+                        语音播报声音:
37
+                        <el-radio-group v-model="form.sjbbsy">
38
+                            <el-radio :label="1">男生</el-radio>
39
+                            <el-radio :label="2">女生</el-radio>
40
+                        </el-radio-group>
71 41
                     </div>
72
-                    <div style="margin-bottom:10px;" v-if="state == 2">
73
-                        <p style="width:50px;display: inline-block;"></p>
74
-                        <el-input style="width:200px;" v-model="input" placeholder="请输入内容"></el-input>
42
+                    <div style="width:480px;">
43
+                        隐藏上机叫号区域:
44
+                        <el-radio-group v-model="form.sjjhyc">
45
+                            <el-radio :label="0">是</el-radio>
46
+                            <el-radio :label="1">否</el-radio>
47
+                        </el-radio-group>
75 48
                     </div>
76
-                    <div>上机</div>
77 49
                 </div>
78 50
                 
79 51
             </div>
80 52
         </div>
81 53
         <div style="display:flex;margin-top:10px;">
82 54
             <div style="width:480px;">
83
-                语音播报声音:
84
-                <el-radio-group v-model="radio">
85
-                    <el-radio :label="1">男生</el-radio>
86
-                    <el-radio :label="2">女生</el-radio>
87
-                </el-radio-group>
88
-            </div>
89
-            <div style="width:480px;">
90
-                隐藏接诊叫号区域:
91
-                <el-radio-group v-model="radio">
92
-                    <el-radio :label="1">是</el-radio>
93
-                    <el-radio :label="2">否</el-radio>
94
-                </el-radio-group>
95
-            </div>
96
-        </div>
97
-        <div style="display:flex;margin-top:10px;">
98
-            <div style="width:480px;">
99
-                隐藏上机叫号区域:
100
-                <el-radio-group v-model="radio">
101
-                    <el-radio :label="1">是</el-radio>
102
-                    <el-radio :label="2">否</el-radio>
55
+                是否在透析管理页面显示排队叫号:
56
+                <el-radio-group v-model="form.txglsyxs">
57
+                    <el-radio :label="1">显示</el-radio>
58
+                    <el-radio :label="0">不显示</el-radio>
103 59
                 </el-radio-group>
104 60
             </div>
105
-            <div style="width:480px;">
106
-                是否在透析管理页面显示排队叫号:
107
-                <el-radio-group v-model="radio">
61
+            <div style="width:480px;margin-bottom:10px;">
62
+                是否在透析记录详情页面显示排队叫号:
63
+                <el-radio-group v-model="form.txxqyxs">
108 64
                     <el-radio :label="1">显示</el-radio>
109
-                    <el-radio :label="2">不显示</el-radio>
65
+                    <el-radio :label="0">不显示</el-radio>
110 66
                 </el-radio-group>
111 67
             </div>
68
+            
112 69
         </div>
113 70
         <div style="display:flex;margin-top:10px;">
114 71
             <div style="width:480px;">
115
-                是否在透析记录详情页面显示排队叫号:
116
-                <el-radio-group v-model="radio">
117
-                    <el-radio :label="1">显示</el-radio>
118
-                    <el-radio :label="2">不显示</el-radio>
119
-                </el-radio-group>
72
+            </div>
73
+            <div style="width:480px;margin-bottom:10px;">
74
+                <el-button @click="changeQueue" type="primary" style="float:right;">修改</el-button>
120 75
             </div>
121 76
         </div>
77
+        
78
+        
122 79
     </div>
123 80
 </template>
124 81
 
125 82
 <script>
83
+import {
84
+  getQueue,changeQueue
85
+} from '@/api/call'
126 86
 export default {
127 87
     data(){
128 88
         return{
@@ -132,7 +92,69 @@ export default {
132 92
             stateOptions:[{ value: 1, label: '智能匹配诊台'},{ value: 2, label: '自定义内容'}],
133 93
             state: 1,
134 94
             input:'',
135
-            radio:1
95
+            radio:1,
96
+
97
+
98
+            form:{
99
+                qhsj:10,
100
+                jzdcbbcs:3,
101
+                jzbbsy:1,
102
+                jzjhyc:0,
103
+                sjdcbbcs:3,
104
+                sjbbsy:1,
105
+                sjjhyc:0,
106
+                txxqyxs:0,
107
+                txglsyxs:0
108
+
109
+
110
+
111
+
112
+            }
113
+        }
114
+    },
115
+    created(){
116
+        this.getQueue()
117
+    },
118
+    methods:{
119
+        getQueue(){
120
+            getQueue().then(res => {
121
+                console.log('peizhi',res)
122
+                let queue_config = res.data.data.queue_config
123
+
124
+                this.form.qhsj = queue_config.qhsj
125
+                this.form.jzdcbbcs = queue_config.jzdcbbcs
126
+                this.form.jzbbsy = queue_config.jzbbsy
127
+                this.form.jzjhyc = queue_config.jzjhyc
128
+                this.form.sjdcbbcs = queue_config.sjdcbbcs
129
+                this.form.sjbbsy = queue_config.sjbbsy
130
+                this.form.sjjhyc = queue_config.sjjhyc
131
+                this.form.txxqyxs = queue_config.txxqyxs
132
+                this.form.txglsyxs = queue_config.txglsyxs
133
+            })
134
+        },
135
+        changeQueue(){
136
+            let org_id =  parseInt(sessionStorage.getItem("org_id"));
137
+            let params = {
138
+                org_id:org_id,
139
+                jzbbsy:this.form.jzbbsy,
140
+                jzdcbbcs:this.form.jzdcbbcs,
141
+                jzjhyc: this.form.jzjhyc,
142
+                qhsj: this.form.qhsj,
143
+                sjbbsy: this.form.sjbbsy,
144
+                sjdcbbcs:this.form.sjdcbbcs,
145
+                sjjhyc: this.form.sjjhyc,
146
+                txxqyxs: this.form.txxqyxs,
147
+                txglsyxs: this.form.txglsyxs,
148
+
149
+            }
150
+            changeQueue(params).then(res => {
151
+                if(res.data.state == 1){
152
+                    this.$message({
153
+                        message: "修改成功",
154
+                        type: 'success'
155
+                    });
156
+                }
157
+            })
136 158
         }
137 159
     }
138 160
 }

+ 43 - 7
src/xt_pages/sign/components/computerCalling.vue Bestand weergeven

@@ -16,10 +16,10 @@
16 16
             </div>
17 17
             <div class="nowCalling" v-if="patientStateVal == 0">
18 18
                 <p class="nowCallingTitle">当前叫号</p>
19
-                <p class="nowCallingName">{{ fisrtQueueInfo.patient_name }}</p>
20
-                <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo.create_time }}</p>
21
-                <p><el-button type="primary" @click="call(fisrtQueueInfo.patient_id)" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
22
-                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo.patient_id)">下一位</el-button>
19
+                <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
+                <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
+                <p><el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
22
+                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
23 23
             </div>
24 24
         </div>
25 25
     </div>
@@ -42,7 +42,9 @@ export default {
42 42
             patientStateVal: 0,
43 43
             waitingCalled:[],
44 44
             called:[],
45
-            fisrtQueueInfo:{}
45
+            fisrtQueueInfo:{},
46
+            timer:null,
47
+
46 48
         }
47 49
     },
48 50
     computed: {
@@ -60,6 +62,24 @@ export default {
60 62
     beforeMount() {
61 63
         this.websocketMess();
62 64
     },
65
+    mounted(){
66
+        this.timer = setInterval(() => {
67
+            let obj = {
68
+                cmd: "queue/join",
69
+                data: {type:4,page:0,size:0},
70
+            };
71
+            this.websocketSend(obj)
72
+        }, 1000*50);
73
+    },
74
+    beforeDestroy(){
75
+        clearInterval(this.timer);  // 清除定时器
76
+        this.timer = null
77
+        let unObj = {
78
+            cmd: "queue/unjoin",
79
+            data: {type:4},
80
+        };
81
+        this.websocketSend(unObj)
82
+    },
63 83
     methods:{
64 84
         websocketSend(data) {
65 85
             try {
@@ -77,7 +97,11 @@ export default {
77 97
                 // let res = re.data;
78 98
                 console.log('res',res)
79 99
                 if(res.channel == 'queue/join'){
80
-                    res.data.fisrtQueueInfo.create_time = moment(res.data.fisrtQueueInfo.create_time * 1000).format('HH:mm')
100
+                    if(res.data.fisrtQueueInfo != null){
101
+                        if(res.data.fisrtQueueInfo.create_time){
102
+                            res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
103
+                        }
104
+                    }
81 105
                     this.fisrtQueueInfo = res.data.fisrtQueueInfo
82 106
                     let arr = res.data.patientQueueList.data
83 107
                     let waitingCalledArr = []
@@ -120,10 +144,14 @@ export default {
120 144
             this.patientStateVal = index
121 145
         },
122 146
         call(patient_id){
147
+            if(patient_id == undefined || patient_id == ""){
148
+                this.$message.error('已经是最后一位了');
149
+                return
150
+            }
123 151
             console.log('patient_id',patient_id)
124 152
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
125 153
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
126
-            axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
154
+            axios.get('/api/index/upcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
127 155
                 console.log(res)
128 156
                 // let patientArr = res.data.queue_list.data
129 157
                 // this.patientArr = patientArr
@@ -137,6 +165,10 @@ export default {
137 165
             })
138 166
         },
139 167
         next(patient_id){
168
+            if(patient_id == undefined || patient_id == ""){
169
+                this.$message.error('已经是最后一位了');
170
+                return
171
+            }
140 172
             console.log('patient_id',patient_id)
141 173
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
142 174
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
@@ -145,6 +177,10 @@ export default {
145 177
                 // let patientArr = res.data.queue_list.data
146 178
                 // this.patientArr = patientArr
147 179
                 // this.$emit('child-event',this.patientArr)
180
+                if(res.data.data.patientInfo == null){
181
+                    this.$message.error('已经是最后一位了');
182
+                    return
183
+                }
148 184
                 if(res.data.code == 200){
149 185
                     this.$message({
150 186
                         message: res.data.msg,

+ 1 - 1
src/xt_pages/sign/components/waitingCalled.vue Bestand weergeven

@@ -8,7 +8,7 @@
8 8
                     <p>签到时间:{{ item.create_time }}</p>
9 9
                 </div>
10 10
             </div>
11
-            <div class="waitingOneRight" @click="call(item.patient_id)">
11
+            <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
12 12
                 <img src="../../../assets/img/volume.png" alt="">
13 13
             </div>
14 14
         </div>

+ 107 - 51
src/xt_pages/sign/lineUp.vue Bestand weergeven

@@ -64,13 +64,13 @@
64 64
                                     <span v-if="item.status == 4">透析中</span>
65 65
                                     <span v-if="item.status == 5">已下机</span>
66 66
                                 </p>
67
-                                <p style="width:14%">{{ item.start_time ? item.start_time : '--' }}</p>
68
-                                <p style="width:16%">{{ item.end_time ? item.end_time : '--' }}</p>
67
+                                <p style="width:14%">{{ item.start_time ? getDates(item.start_time) : '--' }}</p>
68
+                                <p style="width:16%">{{ item.end_time ? getDates(item.end_time) : '--' }}</p>
69 69
                             </div>
70 70
                         </div>
71 71
                     </div> 
72 72
                     <div class="callingBox">
73
-                        <div class="callingBoxLeft">
73
+                        <div :class="(queueConfig.jzjhyc == 1 && queueConfig.sjjhyc == 0) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.jzjhyc == 1">
74 74
                             <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
75 75
                             <div style="flex: 1;">
76 76
                                 <div class="callingTop" style="margin-bottom:10px;">
@@ -89,7 +89,7 @@
89 89
                                 </div>
90 90
                             </div>
91 91
                         </div>
92
-                        <div class="callingBoxLeft">
92
+                        <div :class="(queueConfig.jzjhyc == 0 && queueConfig.sjjhyc == 1) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.sjjhyc == 1">
93 93
                             <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
94 94
                             <div style="flex: 1;">
95 95
                                 <div class="callingTop" style="margin-bottom:10px;">
@@ -143,13 +143,13 @@
143 143
                                     <span v-if="item.status == 4">透析中</span>
144 144
                                     <span v-if="item.status == 5">已下机</span>
145 145
                                 </p>
146
-                                <p style="width:14%">{{ item.start_time ? item.start_time : '--' }}</p>
147
-                                <p style="width:16%">{{ item.end_time ? item.end_time : '--' }}</p>
146
+                                <p style="width:14%">{{ item.start_time ? getDates(item.start_time) : '--' }}</p>
147
+                                <p style="width:16%">{{ item.end_time ? getDates(item.end_time) : '--' }}</p>
148 148
                             </div>
149 149
                         </div>
150 150
                     </div> 
151 151
                     <div class="callingBox">
152
-                        <div class="callingBoxLeft">
152
+                        <div :class="(queueConfig.jzjhyc == 1 && queueConfig.sjjhyc == 0) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.jzjhyc == 1">
153 153
                             <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
154 154
                             <div style="flex: 1;">
155 155
                                 <div class="callingTop" style="margin-bottom:10px;">
@@ -168,7 +168,7 @@
168 168
                                 </div>
169 169
                             </div>
170 170
                         </div>
171
-                        <div class="callingBoxLeft">
171
+                        <div :class="(queueConfig.jzjhyc == 0 && queueConfig.sjjhyc == 1) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.sjjhyc == 1">
172 172
                             <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
173 173
                             <div style="flex: 1;">
174 174
                                 <div class="callingTop" style="margin-bottom:10px;">
@@ -215,6 +215,9 @@ export default {
215 215
             count:0,
216 216
             page:1,
217 217
             timer:null,
218
+            queueConfig:{
219
+                qhsj:10,
220
+            },
218 221
             receivingPatient:[],
219 222
             waitDoctorList:[],
220 223
             upPatientList:[],
@@ -226,7 +229,8 @@ export default {
226 229
             voiceTime:null,
227 230
 
228 231
             voice:true,
229
-            a:1
232
+            a:1,
233
+            
230 234
         }
231 235
     },
232 236
     computed: {
@@ -247,9 +251,33 @@ export default {
247 251
         this.websocketSend(newobj)
248 252
     },
249 253
     beforeMount() {
250
-        this.websocketMess();
254
+        if (this.websocket) {
255
+            if (this.websocket.readyState == 1) {
256
+                console.log('执行1')
257
+                this.websocketMess();
258
+            } else {
259
+                setTimeout(() => {
260
+                    console.log('执行2')
261
+                    this.websocketMess();
262
+                }, 1000);
263
+            }
264
+        } else {
265
+            setTimeout(() => {
266
+                if (this.websocket.readyState == 1) {
267
+                    console.log('执行3')
268
+                    this.websocketMess();
269
+                } else {
270
+                    setTimeout(() => {
271
+                        console.log('执行4')
272
+                        this.websocketMess();
273
+                    }, 1000);
274
+                }
275
+            }, 1000);
276
+        }
277
+        // this.websocketMess();
251 278
     },
252 279
     mounted(){
280
+        
253 281
         this.timer = setInterval(() => {
254 282
             if(this.page < Math.ceil(this.count / 6)){
255 283
                 console.log('执行',Math.ceil(this.count / 6),this.page)
@@ -259,16 +287,24 @@ export default {
259 287
                     data: {page:this.page,size:6}
260 288
                 };
261 289
                 this.websocketSend(obj)
290
+                setTimeout(() => {
291
+                    this.websocketMess();
292
+                }, 1000);
262 293
             }else{
263 294
                 console.log('执行22223333')
264 295
                 this.page = 1
265
-                let obj = {
296
+                let a = {
266 297
                     cmd: "queue/queuelist",
267 298
                     data: {page:this.page,size:6}
268 299
                 };
269
-                this.websocketSend(obj)
300
+                this.websocketSend(a)
301
+                setTimeout(() => {
302
+                    this.websocketMess();
303
+                }, 1000);
304
+                
270 305
             }
271
-        }, 5000);
306
+            console.log('切换时间',this.queueConfig)
307
+        }, 1000 * parseInt(this.queueConfig.qhsj));
272 308
         this.timerID = setInterval(() => {
273 309
             this.updateTime()
274 310
         }, 1000);
@@ -278,13 +314,17 @@ export default {
278 314
         this.timer = null
279 315
         clearInterval(this.timerID);
280 316
         this.timerID = null;  // 清除定时器
317
+        let unObj = {
318
+            cmd:'queue/unjoin',
319
+            data:{type:2}
320
+        }
321
+        this.websocketSend(unObj)
281 322
         // this.timer = null;
282 323
         // let obj = {
283 324
         //     cmd: "queue/join",
284 325
         //     data: {type:1},
285 326
         // };
286 327
         // this.websocketSend(obj)
287
-        console.log('hhhhhhhhhhhhhhhhhhhhhh',this.timerID)
288 328
     },
289 329
     methods:{
290 330
         websocketSend(data) {
@@ -298,33 +338,35 @@ export default {
298 338
             }
299 339
         },
300 340
         websocketMess() {
341
+            console.log('测试')
301 342
             this.websocket.onmessage = e => {
302 343
                 let res = JSON.parse(e.data);
303 344
                 // let res = re.data;
304 345
                 console.log('res',res)
305 346
                 if(res.channel == 'queue/join'){
347
+                    this.queueConfig = res.data.queueConfig
306 348
                     this.lineUpList = res.data.patientQueueList.data
307 349
                     this.receivingPatient = res.data.receivingPatient
308 350
                     this.waitDoctorList = res.data.waitDoctorList
309 351
                     this.upPatientList = res.data.upPatientList
310 352
                     this.count = res.data.patientQueueList.count
311
-                    this.lineUpList.map(item => {
312
-                        item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
313
-                        // item.start_time = moment(item.start_time * 1000).format('HH:mm')
314
-                    })
353
+                    // this.lineUpList.map(item => {
354
+                    //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
355
+                    //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
356
+                    // })
315 357
                 }else if(res.channel == 'queue/queuelist'){
316 358
                     this.lineUpList = res.data.patientQueueList.data
317 359
                     this.count = res.data.patientQueueList.count
318
-                    this.lineUpList.map(item => {
319
-                        item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
320
-                        // item.start_time = moment(item.start_time * 1000).format('HH:mm')
321
-                        if(item.start_time != null){
322
-                            item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
323
-                        }
324
-                        if(item.status == 4){
325
-                            item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
326
-                        }
327
-                    })
360
+                    // this.lineUpList.map(item => {
361
+                    //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
362
+                    //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
363
+                    //     if(item.start_time != null){
364
+                    //         item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
365
+                    //     }
366
+                    //     if(item.status == 5 || item.end_time){
367
+                    //         item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
368
+                    //     }
369
+                    // })
328 370
                 }else if(res.channel == 'patientCallInfo'){
329 371
                     console.log(999999999999,res.data)
330 372
                     
@@ -336,7 +378,13 @@ export default {
336 378
                         // let time1 = null
337 379
                         this.voicePrompt(res.data.callVolUrl)
338 380
                         this.voiceTime = setInterval(() => {
339
-                            if(this.voiceNum < 3){
381
+                            let num = null
382
+                            if(res.data.patientInfo.status == 2){
383
+                                num = parseInt(this.queueConfig.jzdcbbcs)
384
+                            }else if(res.data.patientInfo.status == 3){
385
+                                num = parseInt(this.queueConfig.sjdcbbcs)
386
+                            }
387
+                            if(this.voiceNum < num){
340 388
                                 this.voiceNum++
341 389
                                 this.voicePrompt(res.data.callVolUrl)
342 390
                             }else{
@@ -352,10 +400,10 @@ export default {
352 400
                             }
353 401
                         },6000)
354 402
                     }else {
355
-                        this.$message({
356
-                            message: '警告哦,这是一条警告消息',
357
-                            type: 'warning'
358
-                        });
403
+                        // this.$message({
404
+                        //     message: '警告哦,这是一条警告消息',
405
+                        //     type: 'warning'
406
+                        // });
359 407
                     }
360 408
                 }else if(res.channel == 'updateCallList'){
361 409
                     this.receivingPatient = res.data.queue_list
@@ -379,7 +427,6 @@ export default {
379 427
         updateTime() {
380 428
             var cd = new Date();
381 429
             var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
382
-            console.log(1111111)
383 430
             this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2) + ' (' + week[cd.getDay()] + ")";
384 431
             this.newdate = this.zeroPadding(cd.getFullYear(), 4) + '-' + this.zeroPadding(cd.getMonth() + 1, 2) + '-' + this.zeroPadding(cd.getDate(), 2);
385 432
         },
@@ -418,6 +465,9 @@ export default {
418 465
                 this.showSetting = false;
419 466
             }
420 467
         },
468
+        getDates(time){
469
+            return moment(time * 1000).format('HH:mm:ss')
470
+        }
421 471
     }
422 472
 }
423 473
 </script>
@@ -493,23 +543,29 @@ export default {
493 543
             height: 100%;
494 544
             display: flex;
495 545
             justify-content: space-between;
496
-            .callingTitle{
497
-                width: 130px;
498
-                height: 100%;
499
-                border-radius: 15px 0 0 15px;
500
-                font-size: 66px;
501
-                font-weight:600;
502
-                text-align: center;
503
-                color: #fff;
504
-                background: #1A82BF;
505
-                display: flex;
506
-                align-items: center;
507
-                margin-right: 5px;
508
-            }
509
-            .newCallingTitle{
510
-                background: #1aa680;
511
-            }
512
-        } 
546
+        }
547
+        .callingBoxLeft1{
548
+            width: 99.5%;
549
+            height: 100%;
550
+            display: flex;
551
+            justify-content: space-between;
552
+        }
553
+        .callingTitle{
554
+            width: 130px;
555
+            height: 100%;
556
+            border-radius: 15px 0 0 15px;
557
+            font-size: 66px;
558
+            font-weight:600;
559
+            text-align: center;
560
+            color: #fff;
561
+            background: #1A82BF;
562
+            display: flex;
563
+            align-items: center;
564
+            margin-right: 5px;
565
+        }
566
+        .newCallingTitle{
567
+            background: #1aa680;
568
+        }
513 569
         .callingTop{
514 570
             height: 210px;
515 571
             border-radius: 0 15px 0 0;

+ 4 - 25
src/xt_pages/sign/signIn.vue Bestand weergeven

@@ -152,28 +152,7 @@ export default {
152 152
         this.websocketSend(this.initData)
153 153
     },
154 154
     beforeMount() {
155
-        // if (this.websocket) {
156
-        //     if (this.websocket.readyState == 1) {
157
-        //         this.websocketMess();
158
-        //     } else {
159
-        //         setTimeout(() => {
160
-        //             this.websocketMess();
161
-        //             }, 1000);
162
-        //         }
163
-        //     } else {
164
-        //     setTimeout(() => {
165
-        //         if (this.websocket.readyState == 1) {
166
-        //             this.websocketMess();
167
-        //         } else {
168
-        //             setTimeout(() => {
169
-        //                 this.websocketMess();
170
-        //             }, 1000);
171
-        //         }
172
-        //     }, 1000);
173
-        // }
174
-        // setTimeout(() => {s
175
-            this.websocketMess();
176
-        // }, 1000);
155
+        this.websocketMess();
177 156
     },
178 157
     mounted(){
179 158
         this.timer = setInterval(() => {
@@ -188,11 +167,11 @@ export default {
188 167
             }else{
189 168
                 console.log('执行2222')
190 169
                 this.page = 1
191
-                let obj = {
170
+                let newobj = {
192 171
                     cmd: "queue/queuelist",
193 172
                     data: {page:this.page,size:10}
194 173
                 };
195
-                this.websocketSend(obj)
174
+                this.websocketSend(newobj)
196 175
             }
197 176
         }, 5000);
198 177
         
@@ -206,7 +185,7 @@ export default {
206 185
         clearInterval(this.timerID);  // 清除定时器
207 186
         this.timer = null;
208 187
         let obj = {
209
-            cmd: "queue/join",
188
+            cmd: "queue/unjoin",
210 189
             data: {type:1},
211 190
         };
212 191
         this.websocketSend(obj)