瀏覽代碼

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

28169 1 年之前
父節點
當前提交
84f45b0910
共有 2 個文件被更改,包括 508 次插入459 次删除
  1. 322 371
      src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue
  2. 186 88
      src/xt_pages/workforce/Patientshift.vue

文件差異過大導致無法顯示
+ 322 - 371
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue


+ 186 - 88
src/xt_pages/workforce/Patientshift.vue 查看文件

73
                 </td>
73
                 </td>
74
                 <td>
74
                 <td>
75
                   <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
75
                   <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
76
-                    <div v-if="hidder_chuang==true ? getkongchuang(it,item.list)>0 : ' '">
77
-                      <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais" :style="{'height':!hidder ? '110px': '30px','line-height':hidder ? '30px':''}" @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event,item)" draggable="true"   @dragover="allowDrop"> 
76
+                    <div v-if="hidder_chuang==true ? getkongchuang(it,item.list)>0 : ' '"><!--'background':getcolors(item)>0?'bisque':'#30b8e394'  'background':item2.mode_id==2||item2.mode_id==3?'bisque':'#30b8e394'-->
77
+                      <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais" 
78
+                      :style="{'height':!hidder ? '110px': '45px','overflow': 'auto'}" 
79
+                      @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event,item)" draggable="true"   @dragover="allowDrop"> 
78
                         <div class="huanzhekuai">
80
                         <div class="huanzhekuai">
79
-                          <div v-for="(item2) in item.list"   draggable="true" >
80
-                            <template >
81
-                              <div v-if="it.id==item2.bed_id" style="display: inline-block;">
81
+                          <div v-for="(item2) in item.list" style="width: 100%;">
82
+                            <template>
83
+                              <div v-if="it.id==item2.bed_id" :style="{'display': 'inline-block','color':item2.mode_id==2 || item2.mode_id==3 ? 'red':'black'}">
82
                                 <div>
84
                                 <div>
83
                                   <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
85
                                   <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
84
                                   <span v-if="!hidder" >
86
                                   <span v-if="!hidder" >
308
                 <td>
310
                 <td>
309
                   <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
311
                   <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
310
                     <div v-if="hidder_chuang==true ? getkongchuang(it,item.list)>0 : ' '">
312
                     <div v-if="hidder_chuang==true ? getkongchuang(it,item.list)>0 : ' '">
311
-                      <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais" :style="{'height':!hidder ? '110px': '30px','line-height':hidder ? '30px':''}" @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event,item)" draggable="true"   @dragover="allowDrop"> 
313
+                      <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais" 
314
+                      :style="{'height':!hidder ? '110px': '45px','overflow': 'auto'}" 
315
+                      @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event)" draggable="true"   @dragover="allowDrop"> 
312
                         <div class="huanzhekuai">
316
                         <div class="huanzhekuai">
313
-                          <div v-for="(item2) in item.list"   draggable="true" >
317
+                          <div v-for="(item2) in item.list" :key="item2.bed_id"   draggable="true" >
314
                             <template >
318
                             <template >
315
-                              <div v-if="it.id==item2.bed_id" style="display: inline-block;">
319
+                              <div v-if="it.id==item2.bed_id" :style="{'display': 'inline-block','color':item2.mode_id==2 || item2.mode_id==3 ? 'red':'black'}">
316
                                 <div>
320
                                 <div>
317
                                   <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
321
                                   <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
318
                                   <span v-if="!hidder" >
322
                                   <span v-if="!hidder" >
382
         quhao:'',
386
         quhao:'',
383
         chaung:'',
387
         chaung:'',
384
         patient_id:'',
388
         patient_id:'',
389
+        schedule_remark:'',
390
+        blood_access_id:'',
385
       },
391
       },
386
       currentData:{
392
       currentData:{
387
         currentData_id:'',
393
         currentData_id:'',
470
    console.log('dsafas',this.date);
476
    console.log('dsafas',this.date);
471
     this.getAllZones()
477
     this.getAllZones()
472
     this.getlist()
478
     this.getlist()
479
+    // this.getcolors()
473
   },
480
   },
474
   mounted(){
481
   mounted(){
475
     // console.log('8888',this.huanzhe.order.DeviceNumber.zone.name);
482
     // console.log('8888',this.huanzhe.order.DeviceNumber.zone.name);
476
   },
483
   },
477
-
478
   methods:{
484
   methods:{
479
     quan_ping(){
485
     quan_ping(){
480
       if(this.quanping==false){
486
       if(this.quanping==false){
495
       }
501
       }
496
       return arr
502
       return arr
497
     },
503
     },
504
+    
498
     drop(e,val,value){
505
     drop(e,val,value){
499
       this.allowDrop(e)
506
       this.allowDrop(e)
500
       var bedid = ''
507
       var bedid = ''
513
             patient_id:val.list[i].patient_id,
520
             patient_id:val.list[i].patient_id,
514
             bed_id:val.list[i].bed_id
521
             bed_id:val.list[i].bed_id
515
           }
522
           }
523
+          console.log('kkkk',this.currentData);
516
         }
524
         }
517
       }
525
       }
518
       for(let x=0;x<this.numberlist.length;x++){
526
       for(let x=0;x<this.numberlist.length;x++){
529
       }
537
       }
530
       
538
       
531
       if(e.target.innerText == ''){
539
       if(e.target.innerText == ''){
532
-        console.log('3333',e.target.innerText);
533
         this.schedule={
540
         this.schedule={
534
           schedule_date:this.date,
541
           schedule_date:this.date,
535
           schedule_type:this.classes,
542
           schedule_type:this.classes,
552
           currentData_quhao:this.cur_drag_info.quhao,
559
           currentData_quhao:this.cur_drag_info.quhao,
553
           currentData_chaung:this.cur_drag_info.chaung,
560
           currentData_chaung:this.cur_drag_info.chaung,
554
           patient_id:this.cur_drag_info.patient_id,
561
           patient_id:this.cur_drag_info.patient_id,
555
-          
562
+
556
         }
563
         }
557
         console.log('8888',this.currentData);
564
         console.log('8888',this.currentData);
558
         this.setScheduleTwo(this.cur_drag_info.id)
565
         this.setScheduleTwo(this.cur_drag_info.id)
582
         id_one:this.cur_drag_info.id,
589
         id_one:this.cur_drag_info.id,
583
         id_two:this.currentData.currentData_id
590
         id_two:this.currentData.currentData_id
584
       }
591
       }
592
+      console.log('3333',this.list);
585
         CoverSch(params).then((response) => {
593
         CoverSch(params).then((response) => {
586
         if (response.data.state == 0) {
594
         if (response.data.state == 0) {
587
           this.$message.error(response.data.msg);
595
           this.$message.error(response.data.msg);
588
           this.tipDialogVisibleTwo = false
596
           this.tipDialogVisibleTwo = false
589
         } else {
597
         } else {
590
-          console.log('888888888888',response.data);
598
+          console.log('888888888888',response.data.data);
591
           this.$message.success("替换成功");
599
           this.$message.success("替换成功");
592
           this.tipDialogVisible = false
600
           this.tipDialogVisible = false
593
           this.tipDialogVisibleTwo = false
601
           this.tipDialogVisibleTwo = false
594
-          // const listl=this.list
602
+          const listl=this.list
603
+          // console.log('jjjj',this.list);
604
+          for(let i=0;i<listl.length;i++){
605
+            if(this.cur_drag_info.patient_id== listl[i].patient_id){
606
+              listl[i].bed_id = ''
607
+              this.list.splice(i,1)
608
+              // console.log('0000',i,this.list);
609
+            }
610
+            if(this.currentData.patient_id== listl[i].patient_id){
611
+              listl[i].bed_id = this.currentData.bed_id
612
+              listl[i].id = response.data.data.new_sch.id
613
+              listl[i].name = this.cur_drag_info.name
614
+              listl[i].new_name=this.cur_drag_info.name
615
+              listl[i].partition_id =this.cur_drag_info.partition_id
616
+              
617
+              listl[i].mode_id = this.cur_drag_info.mode_id
618
+              listl[i].patient_id = this.cur_drag_info.patient_id
619
+              listl[i].schedule_date=this.cur_drag_info.schedule_date
620
+              listl[i].schedule_type =this.cur_drag_info.schedule_type
621
+
622
+              listl[i].schedule_week = this.cur_drag_info.schedule_week
623
+              listl[i].order.DeviceNumber.number = this.cur_drag_info.chaung
624
+              listl[i].order.DeviceNumber.zone.name=this.cur_drag_info.quhao
625
+              listl[i].order.schedule_remark=this.cur_drag_info.schedule_remark
626
+              listl[i].order.blood_access_id=this.cur_drag_info.blood_access_id
627
+              // console.log('nnnn',listl[i],this.list);
628
+            }
629
+          }
630
+          return this.list
631
+          // this.getlist()
632
+          // for(let i=0;i<this.list.length;i++){
633
+          //   if(this.currentData.bed_id==this.list[i].bed_id){
634
+          //     this.list[i].patient_id=this.cur_drag_info.patient_id
635
+          //     this.list[i].id= response.data.new_sch.id
636
+          //     // console.log('3333',this.list);
637
+          //     // listl.splice(i,1)
638
+          //   }
639
+          // }
640
+          // console.log('6666',this.list);
641
+          // return this.list
642
+          // 
643
+          // for(let i=0;i<listl.length;i++){
644
+          //   if(this.currentData.bed_id==listl[i].bed_id){
645
+          //     listl[i].patient_id= this.cur_drag_info.patient_id
646
+          //     console.log('bbbb',this.currentData);
647
+          //   }
648
+          //   if(this.cur_drag_info.bed_id==listl[i].bed_id){
649
+          //    listl.splice(i,1)
650
+          //     console.log('bbbb',listl);
651
+          //   }
652
+          // }
653
+
595
           // for(let i=0;i<listl.length;i++){
654
           // for(let i=0;i<listl.length;i++){
596
           //   if(this.cur_drag_info.name== listl[i].name){
655
           //   if(this.cur_drag_info.name== listl[i].name){
597
-          //     listl[i].bed_id = this.cur_drag_info.bed_id
656
+          //     listl[i].bed_id = ''
598
               
657
               
599
           //   }
658
           //   }
600
           //   if(this.currentData.currentData_name== listl[i].name){
659
           //   if(this.currentData.currentData_name== listl[i].name){
601
-          //     listl[i].bed_id = this.cur_drag_info.bed_id
602
-          //     console.log('nnnn',this.ent_index,this.cur_drag_info.bed_id);
660
+          //     listl[i].bed_id = this.currentData.bed_id
661
+          //     listl[i].id = response.data.data.new_sch.id
662
+          //     console.log('nnnn',listl[i],this.cur_drag_info.bed_id);
663
+          //   }
664
+          // }
665
+
666
+          // for(let i=0;i<listl.length;i++){
667
+          //   if(this.currentData.bed_id== listl[i].bed_id){
668
+          //     // listl.splice(i,1)
669
+          //     listl[i].id=response.data.data.new_sch.id
670
+          //     // listl[i].bed_id = this.currentData.bed_id
671
+          //     listl[i].name = this.cur_drag_info.name
672
+          //     listl[i].new_name=this.cur_drag_info.name
673
+          //     listl[i].partition_id =this.cur_drag_info.partition_id
674
+              
675
+          //     listl[i].mode_id = this.cur_drag_info.mode_id
676
+          //     listl[i].patient_id = this.cur_drag_info.patient_id
677
+          //     listl[i].schedule_date=this.cur_drag_info.schedule_date
678
+          //     listl[i].schedule_type =this.cur_drag_info.schedule_type
679
+
680
+          //     listl[i].schedule_week = this.cur_drag_info.schedule_week
681
+          //     listl[i].order.DeviceNumber.number = this.cur_drag_info.chaung
682
+          //     listl[i].order.DeviceNumber.zone.name=this.cur_drag_info.quhao
683
+          //     listl[i].order.schedule_remark=this.cur_drag_info.schedule_remark
684
+          //     listl[i].order.blood_access_id=this.cur_drag_info.blood_access_id
685
+          //     // listl.splice(i,1)
686
+          //     console.log('vvvv',listl[i]);
687
+          //     // return listl
688
+          //   }
689
+          //   console.log('cur_drag_info.bed_id',this.cur_drag_info.bed_id);
690
+          //   if(this.cur_drag_info.bed_id== listl[i].bed_id){
691
+          //     this.list.splice(i,1)
692
+          //     // listl[i].name=''
693
+          //     // listl[i].bed_id=''
694
+          //     // listl[i].new_name=''
695
+          //     // listl[i].mode_id=''
696
+          //     // listl[i].patient_id=''
697
+          //     // listl[i].order.DeviceNumber.number = ''
698
+          //     // listl[i].order.DeviceNumber.zone.name= ''
699
+          //     // listl[i].order.schedule_remark=''
700
+          //     // listl[i].order.blood_access_id=''
701
+          //     listl.splice(i,1)
702
+          //     console.log('this.list',listl[i],this.list);
703
+          //     // return listl
603
           //   }
704
           //   }
705
+          //   // if(this.cur_drag_info.patient_id== listl[i].patient_id){
706
+          //   //   // listl[i].bed_id = this.currentData.bed_id
707
+          //   //   this.lsit=listl.splice(i,1)
708
+          //   //   console.log('nnnn',listl,this.currentData.bed_id);
709
+          //   //   return this.list
710
+          //   // }
711
+           
604
           // }
712
           // }
605
-          this.getlist();
713
+          // console.log('pppp',this.list);
714
+          // return this.list
715
+          // this.getlist();
606
         }
716
         }
607
       });
717
       });
608
     },
718
     },
610
     changeSchTwo(){
720
     changeSchTwo(){
611
       // this.tipDialogVisible=false
721
       // this.tipDialogVisible=false
612
       this.tipDialogVisible=false
722
       this.tipDialogVisible=false
613
-      // this.tipDialogVisibleThree = false
614
-      // const listl=this.list
615
-      // for(let i=0;i<listl.length;i++){
616
-      //   if(this.cur_drag_info.name== listl[i].name){
617
-      //     // drag_index=i
618
-      //     // this.drag_index=listl[i].bed_id
619
-      //     this.currentData.bed_id =listl[i].bed_id
620
-      //     console.log('mmmm',this.drag_index,this.currentData);
621
-          
622
-      //   }
623
-      //   if(this.currentData.currentData_name== listl[i].name){
624
-      //     // this.ent_index=listl[i].bed_id
625
-      //     this.cur_drag_info.bed_id=listl[i].bed_id
626
-      //     console.log('nnnn',this.ent_index,this.cur_drag_info.bed_id);
627
-      //   }
628
-      // }
629
-      // // listl.splice(drag_index, 1, ...listl.splice(ent_index, 1, listl[drag_index]))
630
-      // console.log('zzzzz',this.cur_drag_info);
631
-      // console.log('xxxxx', this.currentData);
632
       let params={
723
       let params={
633
         id_one:this.cur_drag_info.id,
724
         id_one:this.cur_drag_info.id,
634
         id_two:this.currentData.currentData_id
725
         id_two:this.currentData.currentData_id
644
           this.tipDialogVisible = false
735
           this.tipDialogVisible = false
645
           this.tipDialogVisibleThree = false
736
           this.tipDialogVisibleThree = false
646
           
737
           
647
-          // const listl=this.list
648
-          // for(let i=0;i<listl.length;i++){
649
-          //   if(this.cur_drag_info.name== listl[i].name){
650
-          //     listl[i].bed_id = this.currentData.bed_id 
651
-          //     console.log('mmmm',listl,this.currentData);
652
-          //   }
653
-          //   if(this.currentData.currentData_name== listl[i].name){
654
-          //     // this.ent_index=listl[i].bed_id
655
-          //     listl[i].bed_id =this.cur_drag_info.bed_id
656
-          //   }
657
-          // }
658
-           this.getlist();
738
+          const listl=this.list
739
+          for(let i=0;i<listl.length;i++){
740
+            if(this.cur_drag_info.patient_id== listl[i].patient_id){
741
+              listl[i].bed_id = this.currentData.bed_id 
742
+              console.log('mmmm',listl,this.currentData);
743
+            }
744
+            if(this.currentData.patient_id== listl[i].patient_id){
745
+              listl[i].bed_id =this.cur_drag_info.bed_id
746
+            }
747
+          }
748
+          // this.getlist();
659
         }
749
         }
660
       });
750
       });
661
       
751
       
674
       if (response.data.state == 0) {
764
       if (response.data.state == 0) {
675
         this.$message.error(response.data.msg);
765
         this.$message.error(response.data.msg);
676
       } else {
766
       } else {
677
-        // var schedule = response.data.data.schedule;
678
-        // console.log('ddddd',schedule);
679
-        // this.list
680
-        // const listl=this.list
681
-        // for(let i=0;i<listl.length;i++){
682
-        //   if(this.schedule.patient== listl[i].name){
683
-        //     listl[i].bed_id = this.schedule.bed_id 
684
-        //     console.log('mmmm',listl);
685
-        //   }
686
-        // }
687
-         this.getlist()
767
+        var schedule = response.data.data.schedule;
768
+        console.log('ddddd',schedule);
769
+        const listl=this.list
770
+        for(let i=0;i<listl.length;i++){
771
+          if(schedule.patient_id== listl[i].patient_id){
772
+            listl[i].bed_id = schedule.bed_id 
773
+            listl[i].id = schedule.id
774
+            console.log('mmmm',listl[i].id);
775
+            // console.log('kkkk',this.currentData);
776
+          }
777
+        }
688
       }
778
       }
689
     },
779
     },
690
     // 需要拖动的
780
     // 需要拖动的
691
-    curInfoDragStart(e,val){
781
+    curInfoDragStart(e){
692
       const inntext2= e.target.innerText.split('(')[0]
782
       const inntext2= e.target.innerText.split('(')[0]
693
-      for(let i=0;i<val.list.length;i++){
694
-        if(inntext2 == val.list[i].new_name){
783
+      for(let i=0;i<this.list.length;i++){
784
+        if(inntext2 == this.list[i].new_name){
695
           this.cur_drag_info={
785
           this.cur_drag_info={
696
-            id:val.list[i].id,
697
-            name:val.list[i].name,
698
-            quhao:val.list[i].order.DeviceNumber.zone.name,
699
-            chaung:val.list[i].order.DeviceNumber.number,
700
-            patient_id:val.list[i].patient_id,
701
-            bed_id:val.list[i].bed_id,
702
-            mode_id:val.list[i].mode_id,
703
-            partition_id:val.list[i].partition_id,
786
+            id:this.list[i].id,
787
+            name:this.list[i].name,
788
+            quhao:this.list[i].order.DeviceNumber.zone.name,
789
+            chaung:this.list[i].order.DeviceNumber.number,
790
+            patient_id:this.list[i].patient_id,
791
+            bed_id:this.list[i].bed_id,
792
+            mode_id:this.list[i].mode_id,
793
+            partition_id:this.list[i].partition_id,
704
             schedule_date:this.date,
794
             schedule_date:this.date,
705
             schedule_type:this.classes,
795
             schedule_type:this.classes,
706
-            schedule_week: val.list[i].schedule_week,
796
+            schedule_week: this.list[i].schedule_week,
797
+            schedule_remark:this.list[i].order.schedule_remark,
798
+            blood_access_id:this.list[i].order.blood_access_id,
707
           }
799
           }
708
         }
800
         }
709
       }
801
       }
764
       }
856
       }
765
       this.loading = true
857
       this.loading = true
766
       this.tableData = []
858
       this.tableData = []
767
-      console.log('111111111',params);
859
+      // console.log('111111111',params);
768
       getSchedualPrintList(params).then((response) => {
860
       getSchedualPrintList(params).then((response) => {
769
         if (response.data.state == 1) {
861
         if (response.data.state == 1) {
770
           this.loading = false
862
           this.loading = false
781
            list[i][new_name]=this.nameSplit(list[i].name)
873
            list[i][new_name]=this.nameSplit(list[i].name)
782
            
874
            
783
           }
875
           }
784
-          console.log('9999',list);
876
+          // console.log('9999',list);
785
           if (list != null && list.length > 0) {
877
           if (list != null && list.length > 0) {
786
             const dataInfo = {}
878
             const dataInfo = {}
787
             list.forEach((item, index) => {
879
             list.forEach((item, index) => {
814
             // console.log('排班数据------------------', arr)
906
             // console.log('排班数据------------------', arr)
815
 
907
 
816
             this.tableData = arr
908
             this.tableData = arr
817
-            console.log('22222222',this.tableData);
909
+            // console.log('22222222',this.tableData);
818
           }
910
           }
819
 
911
 
820
           this.numberList = response.data.data.numberList
912
           this.numberList = response.data.data.numberList
857
     //   return str
949
     //   return str
858
     // },
950
     // },
859
     // 透析模式
951
     // 透析模式
860
-    getmode(id){
952
+    getmode(ids){
861
       for(let i=0;i<this.mode.length;i++){
953
       for(let i=0;i<this.mode.length;i++){
862
-        if(id=this.mode[i].id){
954
+        if(ids==this.mode[i].id){
863
           return this.mode[i].name
955
           return this.mode[i].name
864
         }
956
         }
865
       }
957
       }
1122
                 this.$message.success("交换成功");
1214
                 this.$message.success("交换成功");
1123
                 this.tipDialogVisible = false
1215
                 this.tipDialogVisible = false
1124
                 this.tipDialogVisibleThree = false
1216
                 this.tipDialogVisibleThree = false
1125
-                this.getlist();
1126
-                // const listl=this.list
1127
-                // for(let i=0;i<listl.length;i++){
1128
-                //   if(this.huanzhe.name== listl[i].name){
1129
-                //     listl[i].bed_id = this.chuangwei 
1130
-                //     console.log('mmmm',listl,this.currentData);
1131
-                //   }
1132
-                //   if(this.genghuan.name== listl[i].name){
1133
-                //     // this.ent_index=listl[i].bed_id
1134
-                //     listl[i].bed_id =this.huanzhe.bed_id
1135
-                //   }
1136
-                // }
1217
+                // this.getlist();
1218
+                const listl=this.list
1219
+                for(let i=0;i<listl.length;i++){
1220
+                  if(this.huanzhe.name== listl[i].name){
1221
+                    listl[i].bed_id = this.chuangwei 
1222
+                    console.log('mmmm',listl,this.currentData);
1223
+                  }
1224
+                  if(this.genghuan.name== listl[i].name){
1225
+                    // this.ent_index=listl[i].bed_id
1226
+                    listl[i].bed_id =this.huanzhe.bed_id
1227
+                  }
1228
+                }
1137
               }
1229
               }
1138
             });
1230
             });
1139
             return this.genghuan
1231
             return this.genghuan
1173
       // }
1265
       // }
1174
     }
1266
     }
1175
   },
1267
   },
1268
+  // watch:{
1269
+  //   list(val){
1270
+  //     console.log('wwwww',val);
1271
+  //     return this.list=val
1272
+  //   }
1273
+  // }
1176
 }
1274
 }
1177
 </script>
1275
 </script>
1178
 
1276