Procházet zdrojové kódy

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

csx před 4 roky
rodič
revize
57075f4459

+ 1 - 0
src/api/advice.js Zobrazit soubor

@@ -498,6 +498,7 @@ export function GetLastOrNextDoctorAdvice(params) {
498 498
 }
499 499
 
500 500
 export function getSchedualDoctors (params) {
501
+  console.log("params-----",params)
501 502
   return request({
502 503
     url: '/api/schedule/advices',
503 504
     method: 'get',

+ 7 - 1
src/views/layout/components/Navbar.vue Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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
     },

+ 55 - 7
src/xt_pages/dialysis/dialysisDoctorAdvice.vue Zobrazit soubor

@@ -64,7 +64,23 @@
64 64
           </ul>
65 65
         </div>
66 66
       </div>
67
-
67
+     
68
+     <div class="cell clearfix">
69
+        <label class="title"> <span class="name">给药途径</span> : </label>
70
+        <div class="time">
71
+          <ul class>
72
+            <li
73
+              :class="item.id == delivery_way ? 'active' : ''"
74
+              @click="selectDeliveryWay(item.id)"
75
+              v-for="item in deliveryWay"
76
+              :key="item.id"
77
+            >
78
+              {{ item.name }}
79
+            </li>
80
+          </ul>
81
+        </div>
82
+      </div>
83
+    
68 84
       <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
69 85
         @selection-change="handleSelectionChange"
70 86
         :row-class-name="tableRowClassName"
@@ -353,7 +369,7 @@ export default {
353 369
         schedul_type: 0,
354 370
         partition_type: 0,
355 371
         schedul_time: "",
356
-        keywords: ""
372
+        keywords: "",
357 373
       },
358 374
       selecting_schs: [],
359 375
       partitionArr: [],
@@ -361,6 +377,8 @@ export default {
361 377
       scheduleMap:[],
362 378
       show:true,
363 379
       showOne:false,
380
+      deliveryWay:[],
381
+      delivery_way:0,
364 382
     };
365 383
   },
366 384
   created() {
@@ -410,14 +428,20 @@ export default {
410 428
       // alert(scheduleType);/
411 429
       this.schedulType = scheduleType;
412 430
       this.listQuery.schedul_type = scheduleType;
413
-      this.requestSchedualDoctors();
431
+      this.requestSchedualDoctors(this.time);
414 432
     },
415 433
     selectPartitionType(partitionType) {
416 434
       this.partitionType = partitionType;
417 435
       this.listQuery.partition_type = partitionType;
418
-      this.requestSchedualDoctors();
436
+      this.requestSchedualDoctors(this.time);
437
+    },
438
+    
439
+    selectDeliveryWay(val){
440
+       this.delivery_way = val
441
+       this.requestSchedualDoctors(this.time)
419 442
     },
420 443
 
444
+
421 445
     changeTime() {
422 446
       this.listQuery.schedul_time = this.time;
423 447
       this.requestSchedualDoctors(this.time)
@@ -430,16 +454,31 @@ export default {
430 454
         } else {
431 455
           this.partitionArr = response.data.data.zone;
432 456
           this.partitionArr.unshift({ id: 0, name: "全部" });
457
+          var dics  =  response.data.data.dics
458
+          var obj = {id:0,name:"全部"}
459
+          this.deliveryWay.push(obj)
460
+          this.deliveryWay.push(...dics)
433 461
         }
434 462
       });
435 463
     },
436 464
     requestSchedualDoctors (time) {
465
+        
466
+        var name = ""
467
+        for(let i=0;i<this.deliveryWay.length;i++){
468
+            if(this.delivery_way == this.deliveryWay[i].id){
469
+              name = this.deliveryWay[i].name
470
+            }
471
+        }
472
+        if(name == '全部'){
473
+          name = ""
474
+        }
475
+
437 476
         let newTime =  moment(time).format('YYYY-MM-DD')
438 477
         getSchedualDoctors({
439 478
         date: newTime,
440 479
         patient_type: 0,
441
-        advice_type: 2
442
-        }).then(rs => {
480
+        advice_type: 2,
481
+        delivery_way:name}).then(rs => {
443 482
         var resp = rs.data
444 483
         if (resp.state == 1) {
445 484
             this.admin_users = resp.data.adminUser
@@ -609,7 +648,16 @@ export default {
609 648
       }
610 649
     //   console.log("sch_ids",sch_ids)
611 650
       this.$store.dispatch("SetAdviceIDs", sch_ids);
612
-      this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime()} });
651
+       var name = ""
652
+        for(let i=0;i<this.deliveryWay.length;i++){
653
+            if(this.delivery_way == this.deliveryWay[i].id){
654
+              name = this.deliveryWay[i].name
655
+            }
656
+        }
657
+        if(name == '全部'){
658
+          name = ""
659
+       }
660
+      this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
613 661
 
614 662
     },
615 663
     batchPrintActionOne: function() {

+ 6 - 1
src/xt_pages/dialysis/doctorAdvicePrint.vue Zobrazit soubor

@@ -258,6 +258,7 @@ export default {
258 258
             time:'',
259 259
             show:true,
260 260
             showOne:false,
261
+            delivery_way:""
261 262
         }
262 263
     },
263 264
     methods:{
@@ -277,7 +278,8 @@ export default {
277 278
             getSchedualDoctors({
278 279
             date: newTime,
279 280
             patient_type: 0,
280
-            advice_type: 2
281
+            advice_type: 2,
282
+            delivery_way:this.delivery_way,
281 283
             }).then(rs => {
282 284
                 var resp = rs.data
283 285
                 if (resp.state == 1) {
@@ -741,6 +743,9 @@ export default {
741 743
     },
742 744
     created(){
743 745
       var time = this.$route.query.time
746
+      var delivery_way = this.$route.query.delivery_way
747
+      console.log("delivery_Way",delivery_way)
748
+      this.delivery_way = delivery_way
744 749
       this.time = moment(time).format('YYYY-MM-DD')
745 750
       console.log(11,this.$route.query)
746 751
       this.requestSchedualDoctors(time)

+ 45 - 2
src/xt_pages/dialysis/schedualPatient.vue Zobrazit soubor

@@ -279,6 +279,15 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
279 279
       }
280 280
     },
281 281
     created() {
282
+      if(sessionStorage.getItem('signIn') != null){
283
+        setTimeout(() => {    
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
+          }
289
+        },1000)
290
+      }
282 291
       var schedule_type_selected = this.$store.getters.schedule_type_selected
283 292
       var zone_selected = this.$store.getters.zone_selected
284 293
       var patient_state_selected = this.$store.getters.patient_state_selected
@@ -379,10 +388,16 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
379 388
           console.log('res3333333333',res)
380 389
           if(res.channel == 'queue/join'){
381 390
             let timeType = null
382
-            if(new Date().getHours() < 11){
391
+            if(this.schedule_type_selected == 1){
383 392
               timeType = 1
384
-            }else if(new Date().getHours() >= 11){
393
+            }else if(this.schedule_type_selected == 2){
385 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
+              }
386 401
             }
387 402
             let fisrtQueueInfo = []
388 403
             this.newFisrtQueueInfo = res.data.fisrtQueueInfo
@@ -436,6 +451,34 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
436 451
           }else if(res.channel == 'patientCallInfo'){
437 452
             res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
438 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
439 482
           }
440 483
         }
441 484
       },

+ 1 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Zobrazit soubor

@@ -1458,6 +1458,7 @@ export default {
1458 1458
         }
1459 1459
 
1460 1460
         this.advices = response.data.data.advices
1461
+        console.log("医嘱数据2222222222",this.advices)
1461 1462
         this.monitors = response.data.data.monitors
1462 1463
         this.summary = response.data.data.summary
1463 1464
         this.org_template_info = response.data.data.org_template_info

+ 10 - 9
src/xt_pages/index/verify_token.vue Zobrazit soubor

@@ -11,18 +11,19 @@ export default {
11 11
     this.$store.dispatch('VerifyToken', this.$route.query.token).then(() => {
12 12
       this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
13 13
         this.$store.dispatch('VerifyConfigList').then(() => {
14
-          // alert('token 验证成功')
15
-          // console.log(this.$store.getters.xt_permission.addRouters)
16
-          this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
17
-  //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
18
-          if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
19
-            this.$router.replace({ path: '/dialysis/dialysisrecord' })
14
+          
15
+            // alert('token 验证成功')
16
+            // console.log(this.$store.getters.xt_permission.addRouters)
17
+            this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
18
+    //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
19
+            if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
20
+              this.$router.replace({ path: '/dialysis/dialysisrecord' })
20 21
 
21
-          }else{
22
-            this.$router.replace({ path: '/home' })
22
+            }else{
23
+              this.$router.replace({ path: '/home' })
23 24
 
24 25
 
25
-          }
26
+            }
26 27
 
27 28
         })
28 29
       })

+ 6 - 7
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Zobrazit soubor

@@ -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>

+ 6 - 4
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue Zobrazit soubor

@@ -233,8 +233,7 @@ export default {
233 233
 
234 234
     },
235 235
     changeEndTime(val) {
236
-      var time =
237
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
236
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
238 237
       if (time < 0) {
239 238
         this.$message.error("结束时间不能小于开始时间");
240 239
         this.listQuery.end_time = "";
@@ -291,7 +290,9 @@ export default {
291 290
      })
292 291
    },
293 292
     geStatistics(){
293
+       console.log("this9999999",this.listQuery)
294 294
       geStatistics(this.listQuery).then(response=>{
295
+
295 296
         if(response.data.state === 1){
296 297
           var statistics =  response.data.data.statistics
297 298
           var treatinfo = response.data.data.treatinfo
@@ -330,12 +331,12 @@ export default {
330 331
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
331 332
             }
332 333
           }
333
-          console.log("dd",dd)
334
+          
334 335
           for (const key in dd) {
335 336
             var total = 0;
336 337
             for (const mkey in this.modeOptions) {
337 338
               if (mkey in dd[key]) {
338
-                console.log("=====",mkey)
339
+               
339 340
                 console.log(this.modeOptions[mkey].name)
340 341
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
341 342
                 var number = parseInt(dd[key][mkey].number);
@@ -352,6 +353,7 @@ export default {
352 353
                 };
353 354
               }
354 355
             }
356
+            this.tableData = []
355 357
             this.tableData.push({ date: key, data: dd[key], total: total });
356 358
           }
357 359
         }

+ 87 - 6
src/xt_pages/sign/components/beforeDialysisCalling.vue Zobrazit soubor

@@ -22,6 +22,7 @@
22 22
                 <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>
23 23
                 <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
24 24
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下一位</el-button>
25
+                <!-- <el-button style="margin:0 auto;" @click="nextFive(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下五位</el-button> -->
25 26
             </div>
26 27
         </div>
27 28
     </div>
@@ -104,6 +105,12 @@ export default {
104 105
             data: {type:3},
105 106
         };
106 107
         this.websocketSend(unObj)
108
+
109
+        let unObj1 = {
110
+            cmd: "queue/unjoin",
111
+            data: {type:4},
112
+        };
113
+        this.websocketSend(unObj1)
107 114
     },
108 115
     methods:{
109 116
         websocketSend(data) {
@@ -130,13 +137,17 @@ export default {
130 137
                             if(res.data.fisrtQueueInfo != null){
131 138
                                 if(this.patientStateVal == 0){
132 139
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.morning
133
-                                    if(fisrtQueueInfo.create_time){
134
-                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
140
+                                    if(fisrtQueueInfo != null){
141
+                                        if(fisrtQueueInfo.create_time){
142
+                                            fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
143
+                                        }
135 144
                                     }
136 145
                                 }else if(this.patientStateVal == 1){
137 146
                                     fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
138
-                                    if(fisrtQueueInfo.create_time){
139
-                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
147
+                                    if(fisrtQueueInfo != null){
148
+                                        if(fisrtQueueInfo.create_time){
149
+                                            fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
150
+                                        }
140 151
                                     }
141 152
                                 }
142 153
                             }
@@ -163,6 +174,17 @@ export default {
163 174
                             // this.waitingCalled = waitingCalledArr
164 175
                             this.waitingCalledAm = waitingCalledAm
165 176
                             this.waitingCalledPm = waitingCalledPm
177
+                            // this.called = calledArr
178
+                        }
179
+                        if(res.data.type == 4){
180
+                            let arr = res.data.patientQueueList.data
181
+                            let calledArr = []
182
+                            arr.map(item => {
183
+                                if(item.status == 2){
184
+                                    item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
185
+                                    calledArr.push(item)
186
+                                }
187
+                            })
166 188
                             this.called = calledArr
167 189
                         }
168 190
                     }else if(res.channel == 'allQueueList'){
@@ -188,11 +210,32 @@ export default {
188 210
                         // this.waitingCalled = waitingCalledArr
189 211
                         this.waitingCalledAm = waitingCalledAm
190 212
                         this.waitingCalledPm = waitingCalledPm
191
-                        this.called = calledArr
213
+                        // this.called = calledArr
192 214
                     }else if(res.channel == 'patientCallInfo'){
193 215
                         res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
194 216
                         this.fisrtQueueInfo = res.data.patientInfo
195 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
196 239
                     }
197 240
                 
198 241
             }
@@ -218,6 +261,13 @@ export default {
218 261
             //     }) 
219 262
             //     this.waitingCalledPm = newArr
220 263
             // }
264
+            if(index == 2){
265
+                let obj = {
266
+                    cmd: "queue/join",
267
+                    data: {type:4,page:0,size:0},
268
+                };
269
+                this.websocketSend(obj)
270
+            }
221 271
             let fisrtQueueInfo = []
222 272
             if(this.newFisrtQueueInfo != null){
223 273
                 if(this.patientStateVal == 0){
@@ -286,6 +336,37 @@ export default {
286 336
                 }
287 337
             })
288 338
         },
339
+        nextFive(patient_id){
340
+            if(patient_id == undefined || patient_id == ""){
341
+                this.$message.error('已经是最后一位了');
342
+                return
343
+            }
344
+            let schedule_type = null
345
+            if(this.patientStateVal == 0){
346
+                schedule_type = 1
347
+            }else if(this.patientStateVal == 1){
348
+                schedule_type = 2
349
+            }
350
+            console.log('patient_id',patient_id)
351
+            let org_id =  parseInt(sessionStorage.getItem("org_id"));
352
+            let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
353
+            axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type + '&num=5').then(res => {
354
+                console.log(res)
355
+                // let patientArr = res.data.queue_list.data
356
+                // this.patientArr = patientArr
357
+                // this.$emit('child-event',this.patientArr)
358
+                if(res.data.data.patientInfo == null){
359
+                    this.$message.error('已经是最后一位了');
360
+                    return
361
+                }
362
+                if(res.data.code == 200){
363
+                    this.$message({
364
+                        message: res.data.msg,
365
+                        type: 'success'
366
+                    });
367
+                }
368
+            })
369
+        },
289 370
         pass(patient_id){
290 371
             console.log('patient_id',patient_id)
291 372
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
@@ -324,7 +405,7 @@ export default {
324 405
     height: 313px;
325 406
     border: 1px solid #e5e5ee;
326 407
     // flex: 1;
327
-    width: 12%;
408
+    width: 14%;
328 409
     text-align: center;
329 410
     .nowCallingTitle{
330 411
         font-size: 20px;

+ 1 - 1
src/xt_pages/sign/components/called.vue Zobrazit soubor

@@ -83,7 +83,7 @@ export default {
83 83
         padding: 9px 0;
84 84
         margin: 0 15px 15px 0;
85 85
         float: left;
86
-        width: 360px;
86
+        width: 400px;
87 87
         cursor: pointer;
88 88
         display: flex;
89 89
         justify-content: space-between;

+ 59 - 5
src/xt_pages/sign/components/computerCalling.vue Zobrazit soubor

@@ -21,6 +21,7 @@
21 21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
22 22
                 <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>
23 23
                 <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
24
+                <el-button style="margin:0 auto;" @click="nextFive(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下五位</el-button>
24 25
             </div>
25 26
         </div>
26 27
     </div>
@@ -105,13 +106,17 @@ export default {
105 106
                         if(res.data.fisrtQueueInfo != null){
106 107
                             if(this.patientStateVal == 0){
107 108
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.morning
108
-                                if(fisrtQueueInfo.create_time){
109
-                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
109
+                                if(fisrtQueueInfo != null){
110
+                                    if(fisrtQueueInfo.create_time){
111
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
112
+                                    }
110 113
                                 }
111 114
                             }else if(this.patientStateVal == 1){
112 115
                                 fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
113
-                                if(fisrtQueueInfo.create_time){
114
-                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
116
+                                if(fisrtQueueInfo != null){
117
+                                    if(fisrtQueueInfo.create_time){
118
+                                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
119
+                                    }
115 120
                                 }
116 121
                             }
117 122
                         }
@@ -138,6 +143,17 @@ export default {
138 143
                         // this.waitingCalled = waitingCalledArr
139 144
                         this.waitingCalledAm = waitingCalledAm
140 145
                         this.waitingCalledPm = waitingCalledPm
146
+                        // this.called = calledArr
147
+                    }
148
+                    if(res.data.type == 5){
149
+                        let arr = res.data.patientQueueList.data
150
+                        let calledArr = []
151
+                        arr.map(item => {
152
+                            if(item.status == 3){
153
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
154
+                                calledArr.push(item)
155
+                            }
156
+                        })
141 157
                         this.called = calledArr
142 158
                     }
143 159
                 }else if(res.channel == 'allQueueList'){
@@ -163,7 +179,7 @@ export default {
163 179
                     // this.waitingCalled = waitingCalledArr
164 180
                     this.waitingCalledAm = waitingCalledAm
165 181
                     this.waitingCalledPm = waitingCalledPm
166
-                    this.called = calledArr
182
+                    // this.called = calledArr
167 183
                 }else if(res.channel == 'patientCallInfo'){
168 184
                     res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
169 185
                     this.fisrtQueueInfo = res.data.patientInfo
@@ -192,6 +208,13 @@ export default {
192 208
             //     }) 
193 209
             //     this.waitingCalledPm = newArr
194 210
             // }
211
+            if(index == 2){
212
+                let obj = {
213
+                    cmd: "queue/join",
214
+                    data: {type:5,page:0,size:0},
215
+                };
216
+                this.websocketSend(obj)
217
+            }
195 218
             let fisrtQueueInfo = []
196 219
             if(this.newFisrtQueueInfo != null){
197 220
                 if(this.patientStateVal == 0){
@@ -260,6 +283,37 @@ export default {
260 283
                 }
261 284
             })
262 285
         },
286
+        nextFive(patient_id){
287
+            if(patient_id == undefined || patient_id == ""){
288
+                this.$message.error('已经是最后一位了');
289
+                return
290
+            }
291
+            console.log('patient_id',patient_id)
292
+            let schedule_type = null
293
+            if(this.patientStateVal == 0){
294
+                schedule_type = 1
295
+            }else if(this.patientStateVal == 1){
296
+                schedule_type = 2
297
+            }
298
+            let org_id =  parseInt(sessionStorage.getItem("org_id"));
299
+            let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
300
+            axios.get('/api/index/nextupcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type + '&num=5').then(res => {
301
+                console.log(res)
302
+                // let patientArr = res.data.queue_list.data
303
+                // this.patientArr = patientArr
304
+                // this.$emit('child-event',this.patientArr)
305
+                if(res.data.data.patientInfo == null){
306
+                    this.$message.error('已经是最后一位了');
307
+                    return
308
+                }
309
+                if(res.data.code == 200){
310
+                    this.$message({
311
+                        message: res.data.msg,
312
+                        type: 'success'
313
+                    });
314
+                }
315
+            })
316
+        },
263 317
     }
264 318
 }
265 319
 </script>

+ 41 - 4
src/xt_pages/sign/components/waitingCalled.vue Zobrazit soubor

@@ -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
 }

+ 11 - 8
src/xt_pages/sign/lineUp.vue Zobrazit soubor

@@ -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",
@@ -326,7 +327,9 @@ export default {
326 327
             this.updateTime()
327 328
         }, 1000);
328 329
         this.newTimes = setInterval(() => {
329
-            this.reload()
330
+            // this.reload()
331
+            sessionStorage.setItem('signIn',2);
332
+            window.location.reload()
330 333
         }, 1000 * 60 * 30);
331 334
     },
332 335
     beforeDestroy(){
@@ -334,8 +337,8 @@ export default {
334 337
         this.timer = null
335 338
         clearInterval(this.timerID);
336 339
         this.timerID = null;  // 清除定时器
337
-        clearInterval(this.newTimes);  // 清除定时器
338
-        this.newTimes = null
340
+        // clearInterval(this.newTimes);  // 清除定时器
341
+        // this.newTimes = null
339 342
         let unObj = {
340 343
             cmd:'queue/unjoin',
341 344
             data:{type:2}
@@ -394,8 +397,8 @@ export default {
394 397
                         // })
395 398
                     }else if(res.channel == 'patientCallInfo'){
396 399
                         console.log(999999999999,res.data)
397
-                        
398
-                        
400
+                        let second = res.data.second
401
+                    
399 402
                         console.log('执行几次',this.voiceNum)
400 403
                         if(this.voice == true){
401 404
                             this.patient_id = res.data.patientInfo.patient_id
@@ -423,7 +426,7 @@ export default {
423 426
                                     clearInterval(this.voiceTime);
424 427
                                     this.voiceTime = null
425 428
                                 }
426
-                            },6000)
429
+                            },1000 * second)
427 430
                         }else {
428 431
                             // this.$message({
429 432
                             //     message: '警告哦,这是一条警告消息',

+ 11 - 3
src/xt_pages/sign/signIn.vue Zobrazit soubor

@@ -170,11 +170,17 @@ export default {
170 170
         },
171 171
     },
172 172
     created(){
173
-        if(sessionStorage.getItem('signInKey') != null){
174
-            if(sessionStorage.getItem('signInKey') == 1){
173
+        if(sessionStorage.getItem('signIn') != null){
174
+            if(sessionStorage.getItem('signIn') == 1){
175 175
                 this.dialogTableVisible = true
176 176
             }
177
+            sessionStorage.removeItem('signIn')
177 178
         }
179
+        // if(sessionStorage.getItem('signInKey') != null){
180
+        //     if(sessionStorage.getItem('signInKey') == 1){
181
+        //         this.dialogTableVisible = true
182
+        //     }
183
+        // }
178 184
         this.initData = {
179 185
             cmd: "queue/join",
180 186
             data: {type:1,page:1,size:10},
@@ -210,7 +216,9 @@ export default {
210 216
         }, 1000);
211 217
         // this.updateTime();
212 218
         this.newTimes = setInterval(() => {
213
-            this.reload()
219
+            // this.reload()
220
+            sessionStorage.setItem('signIn',1);
221
+            window.location.reload()
214 222
         }, 1000 * 60 * 30);
215 223
     },
216 224
     beforeDestroy(){

+ 6 - 6
src/xt_pages/stock/detail/print.vue Zobrazit soubor

@@ -31,7 +31,7 @@
31 31
 
32 32
               <td style="line-height: 50px" width="80">数量</td>
33 33
               <td style="line-height:50px" width="80" v-if="type == 1">进货价</td>
34
-             <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
34
+              <td style="line-height:50px" width="80" v-if="type == 3">出货价</td>
35 35
               <td style="line-height: 50px" width="80" v-if="type == 1 || type == 3">总价</td>
36 36
               <td style="line-height: 50px" width="">备 注</td>
37 37
             </tr>
@@ -40,10 +40,10 @@
40 40
               <td style="line-height: 50px">&nbsp;
41 41
                 {{index+1}}
42 42
               </td>
43
-               <td style="line-height: 50px">
43
+              <td style="line-height: 50px">
44 44
                 <span>{{stock.good_name}}</span>
45 45
               </td>
46
-               <td style="line-height: 50px">
46
+              <td style="line-height: 50px">
47 47
                 <span v-if="stock">{{stock.specification_name}}</span>
48 48
               </td>
49 49
               <td style="line-height: 50px">
@@ -287,9 +287,9 @@
287 287
       getUnit(id){
288 288
         var name = ""
289 289
         for(let i=0;i<this.goodUnit.length;i++){
290
-           if(this.goodUnit[i].id == id){
291
-              name = this.goodUnit[i].name
292
-           }
290
+          if(this.goodUnit[i].id == id){
291
+            name = this.goodUnit[i].name
292
+          }
293 293
         }
294 294
         return name
295 295
       }

+ 25 - 5
src/xt_pages/stock/stockQuery.vue Zobrazit soubor

@@ -310,11 +310,25 @@ export default {
310 310
     calculate: function(val) {
311 311
       return Math.round(parseFloat(val) * 100) / 100;
312 312
     },
313
-    startTimeChange: function() {
314
-      this.GetAllStockQuery();
313
+    startTimeChange: function(val) {
314
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
315
+      
316
+      if (time > 0) {
317
+        this.$message.error("开始时间不能大于结束时间");
318
+        this.start_time = "";
319
+      } else {
320
+        this.GetAllStockQuery();
321
+      }
315 322
     },
316
-    endTimeChange: function() {
317
-      this.GetAllStockQuery();
323
+    endTimeChange: function(val) {
324
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
325
+      if (time < 0) {
326
+        this.$message.error("结束时间不能小于开始时间");
327
+        this.end_time = "";
328
+      } else {
329
+        this.GetAllStockQuery();
330
+      }
331
+     
318 332
     },
319 333
     stockInCount: function(row) {
320 334
       let total = 0;
@@ -331,6 +345,7 @@ export default {
331 345
       return total;
332 346
     },
333 347
     stockOutCount: function(row) {
348
+      console.log("row------",row)
334 349
       let total = 0;
335 350
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
336 351
         total = total + row.query_warehouseout_info[i].count;
@@ -386,7 +401,12 @@ export default {
386 401
            } 
387 402
         }
388 403
         return name
389
-      }
404
+      },
405
+
406
+      getTimestamp(time) {
407
+      // 把时间日期转成时间戳
408
+      return new Date(time).getTime() / 1000;
409
+    },
390 410
   }
391 411
 };
392 412
 </script>

+ 16 - 1
src/xt_pages/workforce/next_remind_print.vue Zobrazit soubor

@@ -145,7 +145,14 @@
145 145
         var resp = rs.data
146 146
         console.log(resp)
147 147
         if (resp.state == 1) {
148
-          this.scheduleData = resp.data.schedule
148
+         var scheduleData = resp.data.schedule
149
+
150
+         for(let i=0;i<scheduleData.length;i++){
151
+             scheduleData[i].sort = scheduleData[i].number.sort
152
+          }
153
+          var arr = scheduleData.sort(this.compare('sort'))
154
+          console.log("打印数据",arr)
155
+          this.scheduleData = arr
149 156
         } else {
150 157
           this.$message.error(resp.msg)
151 158
         }
@@ -281,7 +288,15 @@
281 288
         }
282 289
         
283 290
         
291
+      },
292
+
293
+       compare(property) {
294
+       return function (a, b) {
295
+          var value1 = a[property];
296
+          var value2 = b[property];
297
+          return value1 - value2;
284 298
       }
299
+     },
285 300
     }
286 301
   }
287 302
 </script>

+ 17 - 4
src/xt_pages/workforce/remind_print.vue Zobrazit soubor

@@ -134,7 +134,14 @@
134 134
         var resp = rs.data
135 135
         console.log(resp)
136 136
         if (resp.state == 1) {
137
-          this.scheduleData = resp.data.schdules
137
+           var scheduleData = resp.data.schdules
138
+           console.log("树",scheduleData)
139
+          for(let i=0;i<scheduleData.length;i++){
140
+             scheduleData[i].sort = scheduleData[i].number.sort
141
+          }
142
+          var arr = scheduleData.sort(this.compare('sort'))
143
+          console.log("打印数据",arr)
144
+          this.scheduleData = arr
138 145
         } else {
139 146
           this.$message.error(resp.msg)
140 147
         }
@@ -267,11 +274,17 @@
267 274
         }else{
268 275
           var str = year + "年" + month + "月" + day + "日  " + days;
269 276
           return str;
270
-        }
271
-        
272
-        
277
+        } 
278
+      },
279
+      compare(property) {
280
+       return function (a, b) {
281
+          var value1 = a[property];
282
+          var value2 = b[property];
283
+          return value1 - value2;
273 284
       }
285
+     },
274 286
     }
287
+   
275 288
   }
276 289
 </script>
277 290