Kaynağa Gözat

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 4 yıl önce
ebeveyn
işleme
281666f1aa

+ 7 - 1
src/views/layout/components/Navbar.vue Dosyayı Görüntüle

@@ -305,6 +305,12 @@ export default {
305 305
               this.showWsErr = true;
306 306
               this.wsErrMsg = "网络已断开,请检查网络后重新打开页面";
307 307
               console.log('navigator',navigator)
308
+              let http = 'wss://socket.sgjyun.com?token=' 
309
+              // let http = 'ws://socket.szjkhd.com?token=' //测试
310
+              let token = localStorage.getItem("token")
311
+              this.$store.state.user.websocket = new ReconnectingWebSocket(
312
+                http + token
313
+              );
308 314
             } else if (
309 315
               navigator.onLine == true &&
310 316
               this.websocket.readyState == 1
@@ -312,7 +318,7 @@ export default {
312 318
               this.showWsErr = false;
313 319
             }
314 320
             this.websocket.send("1");
315
-          }, 55000);
321
+          }, 30000);
316 322
         }
317 323
         
318 324
       }).catch(error => {

+ 55 - 4
src/xt_pages/dialysis/details/index.vue Dosyayı Görüntüle

@@ -1696,13 +1696,36 @@ export default {
1696 1696
         // let res = re.data;
1697 1697
         // console.log('res3333333333',res)
1698 1698
         if(res.channel == 'queue/join'){
1699
-          if(res.data.fisrtQueueInfo != null){
1700
-            if(res.data.fisrtQueueInfo.create_time){
1701
-              res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1699
+          let timeType = null
1700
+          if(this.scheduleStateVal == 1){
1701
+            timeType = 1
1702
+          }else if(this.scheduleStateVal == 2){
1703
+            timeType = 2
1704
+          }else{
1705
+            if(new Date().getHours() < 10){
1706
+              timeType = 1
1707
+            }else if(new Date().getHours() >= 10){
1708
+              timeType = 2
1702 1709
             }
1703 1710
           }
1711
+          let fisrtQueueInfo = []
1712
+          this.newFisrtQueueInfo = res.data.fisrtQueueInfo
1713
+          if(res.data.fisrtQueueInfo != null){
1714
+              if(timeType == 1){
1715
+                  fisrtQueueInfo = res.data.fisrtQueueInfo.morning
1716
+                  if(fisrtQueueInfo.create_time){
1717
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1718
+                  }
1719
+              }else if(timeType == 2){
1720
+                  fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
1721
+                  if(fisrtQueueInfo.create_time){
1722
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1723
+                  }
1724
+              }
1725
+          }
1726
+          this.fisrtQueueInfo = fisrtQueueInfo
1704 1727
           this.queueConfig = res.data.queueConfig
1705
-          this.fisrtQueueInfo = res.data.fisrtQueueInfo
1728
+          // this.fisrtQueueInfo = res.data.fisrtQueueInfo
1706 1729
           let arr = res.data.patientQueueList.data
1707 1730
           let waitingCalledArr = []
1708 1731
           let calledArr = []
@@ -1737,6 +1760,34 @@ export default {
1737 1760
         }else if(res.channel == 'patientCallInfo'){
1738 1761
           res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1739 1762
           this.fisrtQueueInfo = res.data.patientInfo
1763
+        }else if(res.channel == 'fisrtQueueInfo'){
1764
+          if(this.scheduleStateVal == 1){
1765
+            timeType = 1
1766
+          }else if(this.scheduleStateVal == 2){
1767
+            timeType = 2
1768
+          }else{
1769
+            if(new Date().getHours() < 10){
1770
+              timeType = 1
1771
+            }else if(new Date().getHours() >= 10){
1772
+              timeType = 2
1773
+            }
1774
+          }
1775
+          let fisrtQueueInfo = []
1776
+          this.newFisrtQueueInfo = res.data.patientInfo
1777
+          if(res.data.patientInfo != null){
1778
+              if(timeType == 1){
1779
+                  fisrtQueueInfo = res.data.patientInfo.morning
1780
+                  if(fisrtQueueInfo.create_time){
1781
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1782
+                  }
1783
+              }else if(timeType == 2){
1784
+                  fisrtQueueInfo = res.data.patientInfo.afternoon
1785
+                  if(fisrtQueueInfo.create_time){
1786
+                      fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
1787
+                  }
1788
+              }
1789
+          }
1790
+          this.fisrtQueueInfo = fisrtQueueInfo
1740 1791
         }
1741 1792
       }
1742 1793
     },

+ 41 - 3
src/xt_pages/dialysis/schedualPatient.vue Dosyayı Görüntüle

@@ -281,7 +281,11 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
281 281
     created() {
282 282
       if(sessionStorage.getItem('signIn') != null){
283 283
         setTimeout(() => {    
284
-          this.$router.replace({ path: '/signIn' })
284
+          if(sessionStorage.getItem('signIn') == 1){
285
+            this.$router.replace({ path: '/signIn' })
286
+          }else if(sessionStorage.getItem('signIn') == 2){
287
+            this.$router.replace({ path: '/lineUp' })
288
+          }
285 289
         },1000)
286 290
       }
287 291
       var schedule_type_selected = this.$store.getters.schedule_type_selected
@@ -384,10 +388,16 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
384 388
           console.log('res3333333333',res)
385 389
           if(res.channel == 'queue/join'){
386 390
             let timeType = null
387
-            if(new Date().getHours() < 11){
391
+            if(this.schedule_type_selected == 1){
388 392
               timeType = 1
389
-            }else if(new Date().getHours() >= 11){
393
+            }else if(this.schedule_type_selected == 2){
390 394
               timeType = 2
395
+            }else{
396
+              if(new Date().getHours() < 10){
397
+                timeType = 1
398
+              }else if(new Date().getHours() >= 10){
399
+                timeType = 2
400
+              }
391 401
             }
392 402
             let fisrtQueueInfo = []
393 403
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
@@ -441,6 +451,34 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
441 451
           }else if(res.channel == 'patientCallInfo'){
442 452
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
443 453
             this.fisrtQueueInfo = res.data.patientInfo
454
+          }else if(res.channel == 'fisrtQueueInfo'){
455
+            if(this.schedule_type_selected == 1){
456
+              timeType = 1
457
+            }else if(this.schedule_type_selected == 2){
458
+              timeType = 2
459
+            }else{
460
+              if(new Date().getHours() < 10){
461
+                timeType = 1
462
+              }else if(new Date().getHours() >= 10){
463
+                timeType = 2
464
+              }
465
+            }
466
+            let fisrtQueueInfo = []
467
+            this.newFisrtQueueInfo = res.data.patientInfo
468
+            if(res.data.patientInfo != null){
469
+                if(timeType == 1){
470
+                    fisrtQueueInfo = res.data.patientInfo.morning
471
+                    if(fisrtQueueInfo.create_time){
472
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
473
+                    }
474
+                }else if(timeType == 2){
475
+                    fisrtQueueInfo = res.data.patientInfo.afternoon
476
+                    if(fisrtQueueInfo.create_time){
477
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
478
+                    }
479
+                }
480
+            }
481
+            this.fisrtQueueInfo = fisrtQueueInfo
444 482
           }
445 483
         }
446 484
       },

+ 6 - 7
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Dosyayı Görüntüle

@@ -80,6 +80,7 @@
80 80
               :label="item.name"
81 81
               :name="item.name"
82 82
             >
83
+            <div class="RP">Rp
83 84
               <el-date-picker
84 85
                 v-model="item.pre_time"
85 86
                 type="datetime"
@@ -88,11 +89,6 @@
88 89
                 value-format="yyyy-MM-dd hh:mm"
89 90
                 placeholder="选择日期">
90 91
               </el-date-picker>
91
-
92
-            </el-tab-pane>
93
-            <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
94
-            </el-tab-pane>
95
-            <div class="RP">Rp
96 92
               <div style="float: right;margin-bottom:5px;margin-right:1%;">
97 93
                 <el-button
98 94
                   round
@@ -109,9 +105,12 @@
109 105
                 </el-button>
110 106
               </div>
111 107
             </div>
108
+              
112 109
 
113
-
114
-
110
+            </el-tab-pane>
111
+            <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
112
+            </el-tab-pane>
113
+            
115 114
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
116 115
                                 :activeType="customTabIndex"></prescription-table>
117 116
           </el-tabs>

+ 23 - 2
src/xt_pages/sign/components/beforeDialysisCalling.vue Dosyayı Görüntüle

@@ -174,7 +174,7 @@ export default {
174 174
                             // this.waitingCalled = waitingCalledArr
175 175
                             this.waitingCalledAm = waitingCalledAm
176 176
                             this.waitingCalledPm = waitingCalledPm
177
-                            this.called = calledArr
177
+                            // this.called = calledArr
178 178
                         }
179 179
                         if(res.data.type == 4){
180 180
                             let arr = res.data.patientQueueList.data
@@ -210,11 +210,32 @@ export default {
210 210
                         // this.waitingCalled = waitingCalledArr
211 211
                         this.waitingCalledAm = waitingCalledAm
212 212
                         this.waitingCalledPm = waitingCalledPm
213
-                        this.called = calledArr
213
+                        // this.called = calledArr
214 214
                     }else if(res.channel == 'patientCallInfo'){
215 215
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
216 216
                         this.fisrtQueueInfo = res.data.patientInfo
217 217
                         this.newFisrtQueueInfo = res.data.patientInfo
218
+                    }else if(res.channel == 'fisrtQueueInfo'){
219
+                        let fisrtQueueInfo = []
220
+                        this.newFisrtQueueInfo = res.data.patientInfo
221
+                        if(res.data.patientInfo != null){
222
+                            if(this.patientStateVal == 0){
223
+                                fisrtQueueInfo = res.data.patientInfo.morning
224
+                                if(fisrtQueueInfo != null){
225
+                                    if(fisrtQueueInfo.create_time){
226
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
227
+                                    }
228
+                                }
229
+                            }else if(this.patientStateVal == 1){
230
+                                fisrtQueueInfo = res.data.patientInfo.afternoon
231
+                                if(fisrtQueueInfo != null){
232
+                                    if(fisrtQueueInfo.create_time){
233
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
234
+                                    }
235
+                                }
236
+                            }
237
+                        }
238
+                        this.fisrtQueueInfo = fisrtQueueInfo
218 239
                     }
219 240
                 
220 241
             }

+ 2 - 2
src/xt_pages/sign/components/computerCalling.vue Dosyayı Görüntüle

@@ -143,7 +143,7 @@ export default {
143 143
                         // this.waitingCalled = waitingCalledArr
144 144
                         this.waitingCalledAm = waitingCalledAm
145 145
                         this.waitingCalledPm = waitingCalledPm
146
-                        this.called = calledArr
146
+                        // this.called = calledArr
147 147
                     }
148 148
                     if(res.data.type == 5){
149 149
                         let arr = res.data.patientQueueList.data
@@ -179,7 +179,7 @@ export default {
179 179
                     // this.waitingCalled = waitingCalledArr
180 180
                     this.waitingCalledAm = waitingCalledAm
181 181
                     this.waitingCalledPm = waitingCalledPm
182
-                    this.called = calledArr
182
+                    // this.called = calledArr
183 183
                 }else if(res.channel == 'patientCallInfo'){
184 184
                     res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
185 185
                     this.fisrtQueueInfo = res.data.patientInfo

+ 41 - 4
src/xt_pages/sign/components/waitingCalled.vue Dosyayı Görüntüle

@@ -9,10 +9,13 @@
9 9
                 </div>
10 10
             </div>
11 11
             <div class="waitingOneRight">
12
-                <span v-if="item.schedule_type == 1">上午</span>
13
-                <span v-if="item.schedule_type == 2">下午</span>
14
-                <span v-if="item.schedule_type == 3">晚上</span>
15
-                <span>{{ item.queue_no }}号</span>
12
+                <div>
13
+                    <span v-if="item.schedule_type == 1">上午</span>
14
+                    <span v-if="item.schedule_type == 2">下午</span>
15
+                    <span v-if="item.schedule_type == 3">晚上</span>
16
+                    <span>{{ item.queue_no }}号</span>
17
+                </div>
18
+                <i class="el-icon-delete deleteIcon" @click="deletePatient(item.patient_id)"></i>
16 19
             </div>
17 20
             <!-- <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
18 21
                 <img src="../../../assets/img/volume.png" alt="">
@@ -56,8 +59,36 @@ export default {
56 59
                 }
57 60
                 
58 61
             })
62
+        },
63
+        deletePatient(patient_id){
64
+            this.$confirm('是否删除?', '提示', {
65
+                confirmButtonText: '确定',
66
+                cancelButtonText: '取消',
67
+                type: 'warning'
68
+            }).then(() => {
69
+                let org_id =  parseInt(sessionStorage.getItem("org_id"));
70
+                let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
71
+                axios.get('/api/index/delpatient?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
72
+                    console.log(res)
73
+                    // let patientArr = res.data.queue_list.data
74
+                    // this.patientArr = patientArr
75
+                    // this.$emit('child-event',this.patientArr)
76
+                    if(res.data.code == 200){
77
+                        this.$message({
78
+                            type: 'success',
79
+                            message: '删除成功!'
80
+                        });
81
+                    }
82
+                })
83
+                
84
+            }).catch(() => {
85
+                        
86
+            });
87
+
88
+
59 89
             
60 90
         }
91
+        
61 92
     }
62 93
     // watch:{
63 94
     //     waitingCalled:{
@@ -109,10 +140,16 @@ export default {
109 140
         }
110 141
         .waitingOneRight{
111 142
             color:#999;
143
+            text-align: center;
112 144
             img{
113 145
                 width: 30px;
114 146
                 margin-top: 6px;
115 147
             }
148
+            .deleteIcon{
149
+                font-size: 22px;
150
+                color:red;
151
+                margin-top: 10px;
152
+            }
116 153
         }
117 154
     }
118 155
 }

+ 8 - 5
src/xt_pages/sign/lineUp.vue Dosyayı Görüntüle

@@ -251,10 +251,11 @@ export default {
251 251
         },
252 252
     },
253 253
     created(){
254
-        if(sessionStorage.getItem('lineUpKey') != null){
255
-            if(sessionStorage.getItem('lineUpKey') == 1){
254
+        if(sessionStorage.getItem('signIn') != null){
255
+            if(sessionStorage.getItem('signIn') == 2){
256 256
                 this.dialogTableVisible = true
257 257
             }
258
+            sessionStorage.removeItem('signIn')
258 259
         }
259 260
         this.initData = {
260 261
             cmd: "queue/join",
@@ -325,9 +326,11 @@ export default {
325 326
         this.timerID = setInterval(() => {
326 327
             this.updateTime()
327 328
         }, 1000);
328
-        // this.newTimes = setInterval(() => {
329
-        //     this.reload()
330
-        // }, 1000 * 60 * 30);
329
+        this.newTimes = setInterval(() => {
330
+            // this.reload()
331
+            sessionStorage.setItem('signIn',2);
332
+            window.location.reload()
333
+        }, 1000 * 60 * 30);
331 334
     },
332 335
     beforeDestroy(){
333 336
         clearInterval(this.timer);  // 清除定时器