Procházet zdrojové kódy

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

陈少旭 před 1 rokem
rodič
revize
8a579ee6f6
2 změnil soubory, kde provedl 225 přidání a 97 odebrání
  1. 1 0
      src/api/schedule.js
  2. 224 97
      src/xt_pages/workforce/Patientshift.vue

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

297
 
297
 
298
 
298
 
299
 export function CreateScheduleTwo(id, schedule,id_two) {
299
 export function CreateScheduleTwo(id, schedule,id_two) {
300
+  console.log("schedule",schedule)
300
   return request({
301
   return request({
301
     url: '/api/schedule/create_two?patient_id=' + id+"&id_two="+id_two,
302
     url: '/api/schedule/create_two?patient_id=' + id+"&id_two="+id_two,
302
     method: 'Post',
303
     method: 'Post',

+ 224 - 97
src/xt_pages/workforce/Patientshift.vue Zobrazit soubor

56
               <tr v-for="(ite,index) in item.zones" :key="index">
56
               <tr v-for="(ite,index) in item.zones" :key="index">
57
                 <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
57
                 <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
58
                 <td>
58
                 <td>
59
-                  <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" @dblclick="db_click($event,it)">
60
-                    <!-- <template> -->
61
-                    <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais"  style="" @drop="drop($event,item)" draggable="true"   @dragover="allowDrop"> 
59
+                  <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
60
+                    <div  v-if="ite.partition_id==it.zone_id" class="huanzhekuais" :style="{'height':hidder ? '30px': '110px','line-height':hidder ? '30px':''}" @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" draggable="true"   @dragover="allowDrop"> 
62
                       <div class="huanzhekuai">
61
                       <div class="huanzhekuai">
63
                         <div v-for="(item2) in item.list"  draggable="true" @dragstart.self="curInfoDragStart($event,item2)">
62
                         <div v-for="(item2) in item.list"  draggable="true" @dragstart.self="curInfoDragStart($event,item2)">
64
                           <template >
63
                           <template >
65
                             <div v-if="it.id==item2.bed_id" style="display: inline-block;">
64
                             <div v-if="it.id==item2.bed_id" style="display: inline-block;">
66
                               <div>
65
                               <div>
67
-                                <span>{{ item2.name }}({{ getmode(item2.mode_id) }})</span><br>
68
-                                <div v-if="hidder" >
66
+                                <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
67
+                                <div v-if="!hidder" >
69
                                   <span style="font-size: 14px;color: rgb(19, 241, 175);margin-bottom: 5px;">{{item2.order.DeviceNumber.zone.name}}-{{item2.order.DeviceNumber.number}}</span><br>
68
                                   <span style="font-size: 14px;color: rgb(19, 241, 175);margin-bottom: 5px;">{{item2.order.DeviceNumber.zone.name}}-{{item2.order.DeviceNumber.number}}</span><br>
70
                                   <span style="font-size: 14px;color:orange;margin-bottom: 5px;">{{getBloodAccess(item2.order.blood_access_id)}}</span><br>
69
                                   <span style="font-size: 14px;color:orange;margin-bottom: 5px;">{{getBloodAccess(item2.order.blood_access_id)}}</span><br>
71
                                   <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">{{item2.order.schedule_remark}}</span>
70
                                   <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">{{item2.order.schedule_remark}}</span>
76
                         </div>
75
                         </div>
77
                       </div> 
76
                       </div> 
78
                                         
77
                                         
79
-                      <!-- <div v-if="ite.partition_id==it.partition_id" style="max-height: 110px; margin-top: 10px;margin-bottom: 5px;background: rgb(74 197 235);" >
80
-                        <span>{{ it.name }}({{ getmode(it.mode_id) }})</span><br>
81
-                        <div v-if="value" >
82
-                          <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">{{it.order.DeviceNumber.zone.name}}-{{it.order.DeviceNumber.number}}</span><br>
83
-                          <span style="font-size: 14px;color:orange;margin-bottom: 5px;">{{getBloodAccess(it.order.blood_access_id)}}</span><br>
84
-                          <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">{{it.order.schedule_remark}}</span>
85
-                        </div> 
86
-                      </div> -->
87
-                      <!-- <div  
88
-                      style="display: inline-block;width: 125px;text-align: center;position: absolute;">
89
-                      {{ it.number }}
90
-                    </div> -->
91
                     </div>
78
                     </div>
92
                     <div v-if="ite.partition_id==it.zone_id" style="display: inline-block;width: 125px;text-align: center;">
79
                     <div v-if="ite.partition_id==it.zone_id" style="display: inline-block;width: 125px;text-align: center;">
93
                       {{ it.number }}
80
                       {{ it.number }}
132
               <div style="width:350px">
119
               <div style="width:350px">
133
                 <div style="display: flex;">
120
                 <div style="display: flex;">
134
                   <div>
121
                   <div>
135
-                    <div style="margin: 10px 30px 10px 10px;background: rgb(74 197 235);height: 110px;width: 125px;text-align: center;">
136
-                      <span >{{ huanzhe.name }}({{getmode(huanzhe.mode_id)}})</span><br>
122
+                    <div style="margin: 10px 30px 10px 10px;background: rgb(74 211 235 / 51%);height: 110px;width: 125px;text-align: center;">
123
+                      <span >{{ huanzhe.name}}({{getmode(huanzhe.mode_id)}})</span><br>
137
                       <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">
124
                       <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">
138
                         {{ huanzhe.zeng_fenqu }}-{{ huanzhe.zeng_chuang }}
125
                         {{ huanzhe.zeng_fenqu }}-{{ huanzhe.zeng_chuang }}
139
                       </span><br>
126
                       </span><br>
279
         currentData_quhao:'',
266
         currentData_quhao:'',
280
         currentData_chaung:'',
267
         currentData_chaung:'',
281
         patient_id:'',
268
         patient_id:'',
269
+        bed_id:'',
270
+        mode_id:'',
271
+        partition_id:'',
272
+        schedule_date:'',
273
+        schedule_type:'',
274
+        schedule_week: '',
275
+      },
276
+      // 交换空白时数据
277
+      schedule:{
278
+        schedule_date:'',
279
+        schedule_type:'',
280
+        bed_id:'',
281
+        partition_id:'',
282
+        schedule_week:'',
283
+        mode_id:'',
284
+        bed_name:'',
285
+        contagions:'',
286
+        id:0,
287
+        partition_type:'',
288
+        patient:'',
289
+        patient_id:'',
290
+        type_name:'',
291
+        zone_name:''
282
       },
292
       },
283
       schedulArr: [
293
       schedulArr: [
284
         { value: 1, label: "上午" },
294
         { value: 1, label: "上午" },
610
         zeng_chuang:'',
620
         zeng_chuang:'',
611
         boolen_id:'',
621
         boolen_id:'',
612
         schedule_remark:'',
622
         schedule_remark:'',
623
+        patient_id:'',
624
+        partition_id:'',
625
+        schedule_week: '',
613
       },
626
       },
614
       xian_fenqu:'',
627
       xian_fenqu:'',
615
       g_xian_fenqu:'',
628
       g_xian_fenqu:'',
621
         genghuan_chuang:'',
634
         genghuan_chuang:'',
622
         g_boolen_id:'',
635
         g_boolen_id:'',
623
         genghuan_remark:'',
636
         genghuan_remark:'',
637
+        patient_id:'',
624
       },
638
       },
625
     }
639
     }
626
   },
640
   },
638
   },
652
   },
639
   methods:{
653
   methods:{
640
    
654
    
641
-    drop(e,val){
655
+    drop(e,val,value){
642
       this.allowDrop(e)
656
       this.allowDrop(e)
643
-      
644
-      console.log('6666',val);
657
+      var bedid = ''
658
+      var bedname=''
659
+      var zonename=''
660
+      var zoneid=''
661
+      console.log('6666',val,value);
645
       console.log('7777',this.numberlist);
662
       console.log('7777',this.numberlist);
646
       const inntext= e.target.innerText.split('(')[0]
663
       const inntext= e.target.innerText.split('(')[0]
647
-      console.log('3333',inntext);
664
+     
648
       for(let i=0;i<val.list.length;i++){
665
       for(let i=0;i<val.list.length;i++){
649
         if(inntext == val.list[i].name){
666
         if(inntext == val.list[i].name){
650
           this.tipDialogVisible=true
667
           this.tipDialogVisible=true
657
           }
674
           }
658
         }
675
         }
659
       }
676
       }
677
+      for(let x=0;x<this.numberlist.length;x++){
678
+        if(value==this.numberlist[x].number){
679
+          bedid = this.numberlist[x].id
680
+          bedname=this.numberlist[x].number
681
+          zoneid =this.numberlist[x].zone_id
682
+        }
683
+      }
684
+      for(let y=0;y<this.partitionArr.length;y++){
685
+        if(zoneid == this.partitionArr[y].id){
686
+          zonename = this.partitionArr[y].name
687
+        }
688
+      }
689
+      console.log('3333',bedid);
660
       if(e.target.innerText == ''){
690
       if(e.target.innerText == ''){
691
+        this.schedule={
692
+          schedule_date:this.date,
693
+          schedule_type:this.classes,
694
+          bed_id:bedid,
695
+          partition_id:zoneid,
696
+          schedule_week:this.cur_drag_info.schedule_week,
697
+          mode_id:this.cur_drag_info.mode_id,
698
+          bed_name:bedname,
699
+          contagions:'',
700
+          id:0,
701
+          partition_type:'',
702
+          patient:this.cur_drag_info.name,
703
+          patient_id:this.cur_drag_info.patient_id,
704
+          type_name:'',
705
+          zone_name:zonename
706
+        }
661
         this.currentData={
707
         this.currentData={
662
           currentData_id:0,
708
           currentData_id:0,
663
           currentData_name:this.cur_drag_info.name,
709
           currentData_name:this.cur_drag_info.name,
664
           currentData_quhao:this.cur_drag_info.quhao,
710
           currentData_quhao:this.cur_drag_info.quhao,
665
           currentData_chaung:this.cur_drag_info.chaung,
711
           currentData_chaung:this.cur_drag_info.chaung,
666
-          patient_id:this.cur_drag_info.patient_id
712
+          patient_id:this.cur_drag_info.patient_id,
713
+          
667
         }
714
         }
668
         console.log('8888',this.currentData.currentData_id);
715
         console.log('8888',this.currentData.currentData_id);
669
         this.setScheduleTwo(this.cur_drag_info.id)
716
         this.setScheduleTwo(this.cur_drag_info.id)
752
     },
799
     },
753
     // 交换空白
800
     // 交换空白
754
     setScheduleTwo(id_two){
801
     setScheduleTwo(id_two){
755
-      this.CreateScheduleTwo(this.currentData.patient_id, this.currentData,id_two);
802
+      this.CreateScheduleTwo(this.currentData.patient_id, this.schedule,id_two);
803
+    },
804
+    // 双击弹窗交换空白
805
+    setSchedulethree(id_two){
806
+      this.CreateScheduleTwo(this.huanzhe.patient_id, this.schedule,id_two);
756
     },
807
     },
757
     async CreateScheduleTwo(id, data,id_two) {
808
     async CreateScheduleTwo(id, data,id_two) {
758
       let response =await CreateScheduleTwo(id, data,id_two)
809
       let response =await CreateScheduleTwo(id, data,id_two)
772
         quhao:val.order.DeviceNumber.zone.name,
823
         quhao:val.order.DeviceNumber.zone.name,
773
         chaung:val.order.DeviceNumber.number,
824
         chaung:val.order.DeviceNumber.number,
774
         patient_id:val.patient_id,
825
         patient_id:val.patient_id,
775
-      
826
+        bed_id:val.bed_id,
827
+        mode_id:val.mode_id,
828
+        partition_id:val.partition_id,
829
+        schedule_date:this.date,
830
+        schedule_type:this.classes,
831
+        schedule_week: val.schedule_week,
776
       }
832
       }
777
       console.log('4444',val);
833
       console.log('4444',val);
778
       console.log('5555',this.cur_drag_info);
834
       console.log('5555',this.cur_drag_info);
891
       }
947
       }
892
     },
948
     },
893
    
949
    
894
-    getPatientName(schedule_type, partition_id) {
895
-      var str = ''
896
-      var arr = []
897
-      if (this.list != null && this.list.length > 0) {
898
-        for (let i = 0; i < this.list.length; i++) {
899
-          if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
900
-            arr.push(this.list[i])
901
-          }
902
-        }
903
-      }
904
-      if (arr.length > 0) {
905
-        for (let i = 0; i < arr.length; i++) {
906
-          arr[i].name = this.nameSplit(arr[i].name)
907
-          console.log('666666',arr[i].name);
908
-          if (this.hiddenFlag) {
909
-            str+= arr[i].name + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp '
910
-          } else {
911
-            str+=arr[i].name
912
-          }
913
-        }
914
-      }
915
-      // console.log(str, 'strstrstr')
916
-      return str
917
-    },
950
+    // getPatientName(schedule_type, partition_id) {
951
+    //   var str = ''
952
+    //   var arr = []
953
+    //   if (this.list != null && this.list.length > 0) {
954
+    //     for (let i = 0; i < this.list.length; i++) {
955
+    //       if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
956
+    //         arr.push(this.list[i])
957
+    //       }
958
+    //     }
959
+    //   }
960
+    //   if (arr.length > 0) {
961
+    //     for (let i = 0; i < arr.length; i++) {
962
+    //       arr[i].name = this.nameSplit(arr[i].name)
963
+    //       console.log('666666',arr[i].name);
964
+    //       if (this.hiddenFlag) {
965
+    //         str+= arr[i].name + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp '
966
+    //       } else {
967
+    //         str+=arr[i].name
968
+    //       }
969
+    //     }
970
+    //   }
971
+    //   // console.log(str, 'strstrstr')
972
+    //   return str
973
+    // },
918
     // 透析模式
974
     // 透析模式
919
     getmode(id){
975
     getmode(id){
920
       for(let i=0;i<this.mode.length;i++){
976
       for(let i=0;i<this.mode.length;i++){
968
       if(e.target.innerText !=''){
1024
       if(e.target.innerText !=''){
969
         this.centerDialogVisible=true
1025
         this.centerDialogVisible=true
970
         this.xian_fenqu=val
1026
         this.xian_fenqu=val
1027
+        console.log('qqqqq',this.chuangwei,'val',val);
971
         for(let i=0;i<this.list.length;i++){
1028
         for(let i=0;i<this.list.length;i++){
972
           // 双击弹窗的右侧第一个数据
1029
           // 双击弹窗的右侧第一个数据
973
           if(val.id==this.list[i].bed_id){
1030
           if(val.id==this.list[i].bed_id){
1031
+            console.log('zzzzz',this.list[i]);
974
             this.huanzhe.id=this.list[i].id
1032
             this.huanzhe.id=this.list[i].id
975
             this.huanzhe.name=this.list[i].name
1033
             this.huanzhe.name=this.list[i].name
976
             this.huanzhe.mode_id=this.list[i].mode_id
1034
             this.huanzhe.mode_id=this.list[i].mode_id
978
             this.huanzhe.zeng_chuang = this.list[i].order.DeviceNumber.number
1036
             this.huanzhe.zeng_chuang = this.list[i].order.DeviceNumber.number
979
             this.huanzhe.boolen_id = this.list[i].order.blood_access_id
1037
             this.huanzhe.boolen_id = this.list[i].order.blood_access_id
980
             this.huanzhe.schedule_remark = this.list[i].order.schedule_remark
1038
             this.huanzhe.schedule_remark = this.list[i].order.schedule_remark
981
-            console.log('55555',this.huanzhe);
982
-          }
1039
+            this.huanzhe.patient_id = this.list[i].patient_id
1040
+            this.huanzhe.partition_id = this.list[i].partition_id
1041
+            this.huanzhe.schedule_week= this.list[i].schedule_week
1042
+            // return this.huanzhe
1043
+          //   console.log('55555',this.huanzhe);
1044
+          }     
983
           // 双击弹窗的右侧第二个默认数据
1045
           // 双击弹窗的右侧第二个默认数据
984
           if(this.chuangwei==this.list[i].bed_id){
1046
           if(this.chuangwei==this.list[i].bed_id){
1047
+            console.log('xxxxx',this.chuangwei);
985
             this.genghuan.id = this.list[i].id
1048
             this.genghuan.id = this.list[i].id
986
             this.genghuan.name=this.list[i].name
1049
             this.genghuan.name=this.list[i].name
987
             this.genghuan.mode_id=this.list[i].mode_id
1050
             this.genghuan.mode_id=this.list[i].mode_id
989
             this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
1052
             this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
990
             this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
1053
             this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
991
             this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
1054
             this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
992
-            console.log('99999',this.genghuan);
993
-            console.log('000000',this.list[i].bed_id);
994
-            return this.genghuan
995
-          }else{
996
-            this.genghuan.id = null
997
-            this.genghuan.name=''
998
-            this.genghuan.mode_id=''
999
-            this.genghuan.genghuan_fenqu=''
1000
-            this.genghuan.genghuan_chuang = ''
1001
-            this.genghuan.g_boolen_id = ''
1002
-            this.genghuan.genghuan_remark =''
1055
+            this.genghuan.patient_id = this.list[i].patient_id
1056
+            // console.log('99999',this.genghuan);
1057
+            // console.log('000000',this.list[i].bed_id);
1058
+            // return this.genghuan
1003
           }
1059
           }
1060
+        // // 第二的床位
1061
+        // for(let y=0;y<this.numberlist.length;y++){
1062
+        //   if(this.chuangwei==this.numberlist[y].id){
1063
+        //     this.g_xian_fenqu=this.numberlist[y]
1064
+        //   }
1004
         }
1065
         }
1005
         // 第二的床位
1066
         // 第二的床位
1006
         for(let y=0;y<this.numberlist.length;y++){
1067
         for(let y=0;y<this.numberlist.length;y++){
1008
             this.g_xian_fenqu=this.numberlist[y]
1069
             this.g_xian_fenqu=this.numberlist[y]
1009
           }
1070
           }
1010
         }
1071
         }
1072
+        return this.genghuan
1011
       }else{
1073
       }else{
1012
         this.centerDialogVisible=false
1074
         this.centerDialogVisible=false
1013
       }
1075
       }
1014
       
1076
       
1015
-      console.log('双击弹窗',this.zeng_fenqu);
1016
-      console.log('双击弹窗33',e);
1077
+      // console.log('双击弹窗',this.zeng_fenqu);
1078
+      // console.log('双击弹窗33',e);
1017
       // console.log('双击弹窗333',value);
1079
       // console.log('双击弹窗333',value);
1018
     },
1080
     },
1019
     // 双击弹窗分区
1081
     // 双击弹窗分区
1023
           this.fenqu_dialog=e
1085
           this.fenqu_dialog=e
1024
         }
1086
         }
1025
       }
1087
       }
1026
-      // if(this.fenqu_dialog==0){
1027
-      //   this.chuangwei=519
1028
-      // }else if(this.fenqu_dialog==375){
1029
-      //   this.chuangwei=519
1030
-      // }else if(this.fenqu_dialog==376){
1031
-      //   this.chuangwei=520
1032
-      // }else if(this.fenqu_dialog==384){
1033
-      //   this.chuangwei=556
1034
-      // }else if(this.fenqu_dialog==424){
1035
-      //   this.chuangwei=672
1036
-      // }else if(this.fenqu_dialog==425){
1037
-      //   this.chuangwei=521
1038
-      // }
1039
       var params = {
1088
       var params = {
1040
         schedule_date: this.date,
1089
         schedule_date: this.date,
1041
         schedule_type: this.classes,
1090
         schedule_type: this.classes,
1056
           for(let i=0;i<numberlist.length;i++){
1105
           for(let i=0;i<numberlist.length;i++){
1057
             if(this.fenqu_dialog==0){
1106
             if(this.fenqu_dialog==0){
1058
               this.subzone = numberlist
1107
               this.subzone = numberlist
1059
-              this.chuangwei = numberlist[0].id
1060
-              this.g_xian_fenqu = numberlist[0]
1108
+              this.chuangwei = numberlist[0].id//默认被交换的床位
1109
+              this.g_xian_fenqu = numberlist[0]//被交换的分区床位对象
1061
             }
1110
             }
1062
             if(this.fenqu_dialog==numberlist[i].zone_id){
1111
             if(this.fenqu_dialog==numberlist[i].zone_id){
1063
               const obj={id:null,number:'',zone_id:null}
1112
               const obj={id:null,number:'',zone_id:null}
1130
       for (let i = 0; i < this.subzone.length; i++) {
1179
       for (let i = 0; i < this.subzone.length; i++) {
1131
         if(e==this.subzone[i].id){
1180
         if(e==this.subzone[i].id){
1132
           this.chuangwei=e
1181
           this.chuangwei=e
1133
-          console.log('77777',this.chuangwei);
1134
         }
1182
         }
1135
       }
1183
       }
1136
       for(let i=0;i<this.list.length;i++){
1184
       for(let i=0;i<this.list.length;i++){
1142
           this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
1190
           this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
1143
           this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
1191
           this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
1144
           this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
1192
           this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
1193
+
1194
+          for(let y=0;y<this.subzone.length;y++){
1195
+            if(this.chuangwei==this.subzone[y].id){
1196
+              this.g_xian_fenqu=this.subzone[y]
1197
+              console.log('cccc',this.g_xian_fenqu);
1198
+            }
1199
+          }
1145
           console.log('99999',this.genghuan);
1200
           console.log('99999',this.genghuan);
1146
           console.log('000000',this.list[i].bed_id);
1201
           console.log('000000',this.list[i].bed_id);
1147
           return this.genghuan
1202
           return this.genghuan
1163
       for(let y=0;y<this.subzone.length;y++){
1218
       for(let y=0;y<this.subzone.length;y++){
1164
         if(this.chuangwei==this.subzone[y].id){
1219
         if(this.chuangwei==this.subzone[y].id){
1165
           this.g_xian_fenqu=this.subzone[y]
1220
           this.g_xian_fenqu=this.subzone[y]
1221
+          console.log('cccc',this.g_xian_fenqu);
1166
         }
1222
         }
1167
       }
1223
       }
1168
     },
1224
     },
1225
+    // 双击弹窗确定
1169
     verify_dialog(){
1226
     verify_dialog(){
1170
       this.centerDialogVisible=false
1227
       this.centerDialogVisible=false
1171
-      console.log('444444444',this.huanzhe.id,this.genghuan.id);
1172
-      let params={
1173
-        id_one:this.huanzhe.id,
1174
-        id_two:this.genghuan.id
1228
+      console.log('mmmmm',this.genghuan.id);
1229
+      if(this.genghuan.id != ''){
1230
+        for(let i=0;i<this.list.length;i++){
1231
+          if(this.chuangwei==this.list[i].bed_id){
1232
+            console.log('hhhhh',this.chuangwei);
1233
+            let params={
1234
+              id_one:this.huanzhe.id,
1235
+              id_two:this.genghuan.id
1175
 
1236
 
1237
+            }
1238
+            ExchangeSch(params).then((response) => {
1239
+              if (response.data.state == 0) {
1240
+                this.$message.error(response.data.msg);
1241
+                this.tipDialogVisibleThree = false
1242
+              } else {
1243
+                console.log('22222222',response.data);
1244
+                this.$message.success("交换成功");
1245
+                this.tipDialogVisible = false
1246
+                this.tipDialogVisibleThree = false
1247
+                this.getlist();
1248
+              }
1249
+            });
1250
+            return this.genghuan
1251
+          }
1252
+      //     // else{
1253
+      //     //   var zonename=''
1254
+      //     //   var bedname=''
1255
+      //     //   var zoneid=''
1256
+      //     //   console.log('6666',this.chuangwei);
1257
+      //     //   for(let y=0;y<this.subzone.length;y++){
1258
+      //     //     if(this.chuangwei == this.subzone[y].id){
1259
+      //     //       bedname=this.subzone[y].number
1260
+      //     //       zoneid=this.subzone[y].zone_id
1261
+      //     //       console.log('aaaa',this.chuangwei,this.subzone[y].id,this.subzone[y].number);
1262
+      //     //       this.schedule={
1263
+      //     //         schedule_date:this.date,
1264
+      //     //         schedule_type:this.classes,
1265
+      //     //         bed_id:this.chuangwei,
1266
+      //     //         partition_id:zoneid,
1267
+      //     //         schedule_week:this.huanzhe.schedule_week,
1268
+      //     //         mode_id:this.huanzhe.mode_id,
1269
+      //     //         bed_name:bedname,
1270
+      //     //         contagions:'',
1271
+      //     //         id:0,
1272
+      //     //         partition_type:'',
1273
+      //     //         patient:this.huanzhe.name,
1274
+      //     //         patient_id:this.huanzhe.patient_id,
1275
+      //     //         type_name:'',
1276
+      //     //         zone_name:zonename
1277
+      //     //       }
1278
+      //     //       this.setSchedulethree(this.huanzhe.id)
1279
+      //     //       return ''
1280
+      //     //     }
1281
+      //     //   }
1282
+      //     // }
1283
+        }
1176
       }
1284
       }
1177
-      ExchangeSch(params).then((response) => {
1178
-        if (response.data.state == 0) {
1179
-          this.$message.error(response.data.msg);
1180
-          this.tipDialogVisibleThree = false
1181
-        } else {
1182
-          console.log('22222222',response.data);
1183
-          this.$message.success("交换成功");
1184
-          this.tipDialogVisible = false
1185
-          this.tipDialogVisibleThree = false
1186
-          this.getlist();
1285
+      // else if(this.genghuan.id == 'null'){
1286
+        var zonename=''
1287
+        var bedname=''
1288
+        var zoneid=''
1289
+        console.log('6666',this.chuangwei);
1290
+        for(let y=0;y<this.subzone.length;y++){
1291
+          if(this.chuangwei == this.subzone[y].id){
1292
+            bedname=this.subzone[y].number
1293
+            zoneid=this.subzone[y].zone_id
1294
+            console.log('aaaa',this.chuangwei,this.subzone[y].id,this.subzone[y].number);
1295
+            this.schedule={
1296
+              schedule_date:this.date,
1297
+              schedule_type:this.classes,
1298
+              bed_id:this.chuangwei,
1299
+              partition_id:zoneid,
1300
+              schedule_week:this.huanzhe.schedule_week,
1301
+              mode_id:this.huanzhe.mode_id,
1302
+              bed_name:bedname,
1303
+              contagions:'',
1304
+              id:0,
1305
+              partition_type:'',
1306
+              patient:this.huanzhe.name,
1307
+              patient_id:this.huanzhe.patient_id,
1308
+              type_name:'',
1309
+              zone_name:zonename
1310
+            }
1311
+            this.setSchedulethree(this.huanzhe.id)
1312
+            return ''
1313
+          }
1187
         }
1314
         }
1188
-      });
1315
+      // }
1189
     }
1316
     }
1190
   }
1317
   }
1191
 }
1318
 }
1244
             text-align: center;
1371
             text-align: center;
1245
             margin:0 10px;
1372
             margin:0 10px;
1246
             // line-height: 110px;
1373
             // line-height: 110px;
1247
-            background: #30b8e3;
1374
+            background: #30b8e394;
1248
            }
1375
            }
1249
            
1376
            
1250
           }
1377
           }