Przeglądaj źródła

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

XMLWAN 4 lat temu
rodzic
commit
281666f1aa

+ 7 - 1
src/views/layout/components/Navbar.vue Wyświetl plik

305
               this.showWsErr = true;
305
               this.showWsErr = true;
306
               this.wsErrMsg = "网络已断开,请检查网络后重新打开页面";
306
               this.wsErrMsg = "网络已断开,请检查网络后重新打开页面";
307
               console.log('navigator',navigator)
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
             } else if (
314
             } else if (
309
               navigator.onLine == true &&
315
               navigator.onLine == true &&
310
               this.websocket.readyState == 1
316
               this.websocket.readyState == 1
312
               this.showWsErr = false;
318
               this.showWsErr = false;
313
             }
319
             }
314
             this.websocket.send("1");
320
             this.websocket.send("1");
315
-          }, 55000);
321
+          }, 30000);
316
         }
322
         }
317
         
323
         
318
       }).catch(error => {
324
       }).catch(error => {

+ 55 - 4
src/xt_pages/dialysis/details/index.vue Wyświetl plik

1696
         // let res = re.data;
1696
         // let res = re.data;
1697
         // console.log('res3333333333',res)
1697
         // console.log('res3333333333',res)
1698
         if(res.channel == 'queue/join'){
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
           this.queueConfig = res.data.queueConfig
1727
           this.queueConfig = res.data.queueConfig
1705
-          this.fisrtQueueInfo = res.data.fisrtQueueInfo
1728
+          // this.fisrtQueueInfo = res.data.fisrtQueueInfo
1706
           let arr = res.data.patientQueueList.data
1729
           let arr = res.data.patientQueueList.data
1707
           let waitingCalledArr = []
1730
           let waitingCalledArr = []
1708
           let calledArr = []
1731
           let calledArr = []
1737
         }else if(res.channel == 'patientCallInfo'){
1760
         }else if(res.channel == 'patientCallInfo'){
1738
           res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1761
           res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
1739
           this.fisrtQueueInfo = res.data.patientInfo
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 Wyświetl plik

281
     created() {
281
     created() {
282
       if(sessionStorage.getItem('signIn') != null){
282
       if(sessionStorage.getItem('signIn') != null){
283
         setTimeout(() => {    
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
         },1000)
289
         },1000)
286
       }
290
       }
287
       var schedule_type_selected = this.$store.getters.schedule_type_selected
291
       var schedule_type_selected = this.$store.getters.schedule_type_selected
384
           console.log('res3333333333',res)
388
           console.log('res3333333333',res)
385
           if(res.channel == 'queue/join'){
389
           if(res.channel == 'queue/join'){
386
             let timeType = null
390
             let timeType = null
387
-            if(new Date().getHours() < 11){
391
+            if(this.schedule_type_selected == 1){
388
               timeType = 1
392
               timeType = 1
389
-            }else if(new Date().getHours() >= 11){
393
+            }else if(this.schedule_type_selected == 2){
390
               timeType = 2
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
             let fisrtQueueInfo = []
402
             let fisrtQueueInfo = []
393
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
403
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
441
           }else if(res.channel == 'patientCallInfo'){
451
           }else if(res.channel == 'patientCallInfo'){
442
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
452
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
443
             this.fisrtQueueInfo = res.data.patientInfo
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 Wyświetl plik

80
               :label="item.name"
80
               :label="item.name"
81
               :name="item.name"
81
               :name="item.name"
82
             >
82
             >
83
+            <div class="RP">Rp
83
               <el-date-picker
84
               <el-date-picker
84
                 v-model="item.pre_time"
85
                 v-model="item.pre_time"
85
                 type="datetime"
86
                 type="datetime"
88
                 value-format="yyyy-MM-dd hh:mm"
89
                 value-format="yyyy-MM-dd hh:mm"
89
                 placeholder="选择日期">
90
                 placeholder="选择日期">
90
               </el-date-picker>
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
               <div style="float: right;margin-bottom:5px;margin-right:1%;">
92
               <div style="float: right;margin-bottom:5px;margin-right:1%;">
97
                 <el-button
93
                 <el-button
98
                   round
94
                   round
109
                 </el-button>
105
                 </el-button>
110
               </div>
106
               </div>
111
             </div>
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
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
114
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
116
                                 :activeType="customTabIndex"></prescription-table>
115
                                 :activeType="customTabIndex"></prescription-table>
117
           </el-tabs>
116
           </el-tabs>

+ 23 - 2
src/xt_pages/sign/components/beforeDialysisCalling.vue Wyświetl plik

174
                             // this.waitingCalled = waitingCalledArr
174
                             // this.waitingCalled = waitingCalledArr
175
                             this.waitingCalledAm = waitingCalledAm
175
                             this.waitingCalledAm = waitingCalledAm
176
                             this.waitingCalledPm = waitingCalledPm
176
                             this.waitingCalledPm = waitingCalledPm
177
-                            this.called = calledArr
177
+                            // this.called = calledArr
178
                         }
178
                         }
179
                         if(res.data.type == 4){
179
                         if(res.data.type == 4){
180
                             let arr = res.data.patientQueueList.data
180
                             let arr = res.data.patientQueueList.data
210
                         // this.waitingCalled = waitingCalledArr
210
                         // this.waitingCalled = waitingCalledArr
211
                         this.waitingCalledAm = waitingCalledAm
211
                         this.waitingCalledAm = waitingCalledAm
212
                         this.waitingCalledPm = waitingCalledPm
212
                         this.waitingCalledPm = waitingCalledPm
213
-                        this.called = calledArr
213
+                        // this.called = calledArr
214
                     }else if(res.channel == 'patientCallInfo'){
214
                     }else if(res.channel == 'patientCallInfo'){
215
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
215
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
216
                         this.fisrtQueueInfo = res.data.patientInfo
216
                         this.fisrtQueueInfo = res.data.patientInfo
217
                         this.newFisrtQueueInfo = res.data.patientInfo
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 Wyświetl plik

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

+ 41 - 4
src/xt_pages/sign/components/waitingCalled.vue Wyświetl plik

9
                 </div>
9
                 </div>
10
             </div>
10
             </div>
11
             <div class="waitingOneRight">
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
             </div>
19
             </div>
17
             <!-- <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
20
             <!-- <div class="waitingOneRight" @click="call(item.patient_id)" style="display: none;">
18
                 <img src="../../../assets/img/volume.png" alt="">
21
                 <img src="../../../assets/img/volume.png" alt="">
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
     // watch:{
93
     // watch:{
63
     //     waitingCalled:{
94
     //     waitingCalled:{
109
         }
140
         }
110
         .waitingOneRight{
141
         .waitingOneRight{
111
             color:#999;
142
             color:#999;
143
+            text-align: center;
112
             img{
144
             img{
113
                 width: 30px;
145
                 width: 30px;
114
                 margin-top: 6px;
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 Wyświetl plik

251
         },
251
         },
252
     },
252
     },
253
     created(){
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
                 this.dialogTableVisible = true
256
                 this.dialogTableVisible = true
257
             }
257
             }
258
+            sessionStorage.removeItem('signIn')
258
         }
259
         }
259
         this.initData = {
260
         this.initData = {
260
             cmd: "queue/join",
261
             cmd: "queue/join",
325
         this.timerID = setInterval(() => {
326
         this.timerID = setInterval(() => {
326
             this.updateTime()
327
             this.updateTime()
327
         }, 1000);
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
     beforeDestroy(){
335
     beforeDestroy(){
333
         clearInterval(this.timer);  // 清除定时器
336
         clearInterval(this.timer);  // 清除定时器