See999 3 years ago
parent
commit
290238a6d0

+ 2 - 0
src/store/getters.js View File

@@ -22,6 +22,8 @@ const getters = {
22 22
   xt_user: state => state.xt_user,
23 23
   schedule_type_selected: state => state.xt_user.schedule_type_selected,
24 24
   zone_selected: state => state.xt_user.zone_selected,
25
+  patient_state_selected: state => state.xt_user.patient_state_selected,
26
+  treat_state_selected: state => state.xt_user.treat_state_selected,
25 27
 
26 28
   xt_role_temps: state => state.xt_role_temps,
27 29
 

+ 14 - 0
src/store/modules/xt_user.js View File

@@ -9,6 +9,8 @@ const xt_user = {
9 9
     org_id: 0,
10 10
     schedule_type_selected: 0,
11 11
     zone_selected: 0,
12
+    patient_state_selected: 0,
13
+    treat_state_selected: 0,
12 14
     app_id: 0,
13 15
     user: {
14 16
       id: 0,
@@ -60,6 +62,12 @@ const xt_user = {
60 62
     SET_ZONE_SELECTED: (state, zone_selected) => {
61 63
       state.zone_selected = zone_selected
62 64
     },
65
+    SET_PAtIENT_STATE_SELECTED: (state, patient_state_selected) => {
66
+      state.patient_state_selected = patient_state_selected
67
+    },
68
+    SET_TREAT_STATE_SELECTED: (state, treat_state_selected) => {
69
+      state.treat_state_selected = treat_state_selected
70
+    },
63 71
     SET_FILEDS_LIST: (state, configlist) => {
64 72
       state.fileds = configlist
65 73
     },
@@ -176,6 +184,12 @@ const xt_user = {
176 184
     SetZoneSelected({ commit }, zone_selected) {
177 185
       commit('SET_ZONE_SELECTED', zone_selected)
178 186
     },
187
+    SetPatientStateSelected({ commit }, patient_state_selected) {
188
+      commit('SET_PAtIENT_STATE_SELECTED', patient_state_selected)
189
+    },
190
+    SetTreatStateSelected({ commit }, treat_state_selected) {
191
+      commit('SET_TREAT_STATE_SELECTED', treat_state_selected)
192
+    },
179 193
     SetSubscibePatients({
180 194
                           commit,
181 195
                           state

+ 402 - 12
src/xt_pages/dialysis/PatientBox.vue View File

@@ -6,7 +6,7 @@
6 6
       v-for="schedule in schedules"
7 7
       v-if="schedule.patient"
8 8
       :class="borderColor(schedule)"
9
-      @click="detailAction(schedule)"
9
+      @click.stop="detailAction(schedule)"
10 10
       :key="schedule.id"
11 11
     >
12 12
       <div class="kehu">
@@ -19,6 +19,7 @@
19 19
             "
20 20
             alt=""
21 21
           />
22
+          <div>
22 23
           <div class="right">
23 24
             <h3 class="name">
24 25
               {{ schedule.patient.name
@@ -28,9 +29,23 @@
28 29
               >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
29 30
             >
30 31
           </div>
32
+          <div style="margin-top:5px;text-align:left;height:24px;">
33
+              <span class="tip1" v-if="schedule.prescription == null || schedule.prescription.creater == 0" @click.stop="open(schedule)">
34
+                开处方
35
+              </span>
36
+              <span class="tip2" v-if="schedule.treatment_summary == null || schedule.treatment_summary.dialysis_summary == ''" @click.stop="open1(schedule)">
37
+                开小结
38
+              </span>
39
+            </div>
31 40
         </div>
32
-        <div class="online" v-show="computeState(schedule) != 4">
33
-          <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
41
+        </div>
42
+        <div>
43
+          <div style="height:24px;margin-right: 10px;">
44
+            <div class="online" v-show="computeState(schedule) != 4">
45
+              <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
46
+            </div>
47
+          </div>
48
+          <div style="margin-top:13px;font-size:12px;color:#a8b3ba;margin-right: 5px;" v-if="schedule.assessment_before_dislysis && patientStateVal == 1">签到时间:{{ getTime(schedule.assessment_before_dislysis.created_time) }}</div>
34 49
         </div>
35 50
       </div>
36 51
       <div class="function" :class="functionColor(schedule)">
@@ -56,15 +71,65 @@
56 71
       </div>
57 72
     </div>
58 73
     <!-- </router-link> -->
74
+    <dialysis-prescription-dialog
75
+      title="透析处方"
76
+      ref="prescription"
77
+      :patient="patient"
78
+      :prescription="prescription"
79
+      :solution="solution"
80
+      @advice="adviceFunc"
81
+      :niprocart_info="niprocart_info"
82
+      :jms_info="jms_info"
83
+      :fistula_needle_set_info="fistula_needle_set_info"
84
+      :fistula_needle_set_16_info="fistula_needle_set_16_info"
85
+      :hemoperfusion_info="hemoperfusion_info"
86
+      :dialyser_sterilised_info="dialyser_sterilised_info"
87
+      :filtryzer_info="filtryzer_info"
88
+      :dialyzers_info="dialyzers_info"
89
+      :injector_info="injector_info"
90
+      :bloodlines_info="bloodlines_info"
91
+      :tubingHemodialysis_info="tubingHemodialysis_info"
92
+      :safe_package_info="safe_package_info"
93
+      :aliquid_info="aliquid_info"
94
+      :config="config"
95
+      :admin_users="admin_users"
96
+      :targetAdvices="longAdvices"
97
+      :waitUploadAdvices="waitUploadAdvices"
98
+      :is_open="is_open"
99
+      :predialysis="predialysis_evaluation"
100
+      :last_predialysis="lastPredialysisEvaluation"
101
+      :record="assessment_after_dislysis"
102
+      :last_record="lastAssessmentAfterDislysis"
103
+      :last_prescription="lastDialysisPrescribe"
104
+      :dry_weight="lastDryWeightDislysis"
105
+      :schedual="temp_schedual"
106
+      :date='date'
107
+    ></dialysis-prescription-dialog>
108
+    <treatment-summary-dialog
109
+      title="治疗小结"
110
+      ref="treatmentSummary"
111
+      :patient="patient"
112
+      :treatment_summary="treatment_summary"
113
+    ></treatment-summary-dialog>
59 114
   </div>
60 115
 </template>
61 116
 
62 117
 <script>
63 118
 import { parseTime } from "@/utils";
64 119
 import { jsGetAge } from "@/utils/tools";
120
+import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
121
+import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
122
+import {
123
+  getDialysisScheduleDetail,
124
+  getLongAdvice,
125
+} from "@/api/dialysis_record";
65 126
 
66 127
 export default {
67 128
   name: "PatientBox",
129
+  components:{
130
+    dialysisPrescriptionDialog,
131
+    treatmentSummaryDialog
132
+  },
68 133
   data() {
69 134
     return {
70 135
       patients: [
@@ -96,13 +161,64 @@ export default {
96 161
           sex: "女",
97 162
           age: 90
98 163
         }
99
-      ]
164
+      ],
165
+      //
166
+      longAdvices: [],
167
+      waitUploadAdvices: [],
168
+      is_open: 0,
169
+      targetAdvices: [],
170
+
171
+      patient: { id: 0 }, // 患者信息
172
+      schedual: { id: 0 }, // 患者排班信息
173
+      prescription: { id: 0 }, // 透析处方
174
+      solution: { id: 0 }, // 透析方案
175
+      system_prescribe: { id: 0 },
176
+      receiver_treatment_access: { id: 0 }, // 接诊评估
177
+      predialysis_evaluation: { id: 0 }, // 透前评估
178
+      doctor_advices: [], // 临时医嘱
179
+      double_check: { id: 0 }, // 双人核对
180
+      assessment_after_dislysis: { id: 0 }, // 透后评估
181
+      treatment_summary: { id: 0 }, // 治疗小结
182
+      monitor_records: [], // 透析监测
183
+      dialysis_order: { id: 0 }, // 透析记录
184
+      admin_users: [], // 系统用户列表
185
+      devices: [], // 设备
186
+      device_numbers: [], // 床位号
187
+
188
+      admin_user_map: {}, // {user_id: admin_user object}
189
+      device_map: {}, // {device_id: device}
190
+      device_number_map: {}, // {device_number_id: device_number}
191
+
192
+      niprocart_info: [],
193
+      jms_info: [],
194
+      fistula_needle_set_info: [],
195
+      fistula_needle_set_16_info: [],
196
+      hemoperfusion_info: [],
197
+      dialyser_sterilised_info: [],
198
+      filtryzer_info: [],
199
+      dialyzers_info: [],
200
+      injector_info: [],
201
+      bloodlines_info: [],
202
+      tubingHemodialysis_info: [],
203
+      safe_package_info: [],
204
+      aliquid_info: [],
205
+      config: {},
206
+
207
+      lastPredialysisEvaluation: { id: 0 },
208
+      lastMonitorRecord: { id: 0 },
209
+      lastAssessmentAfterDislysis: { id: 0 },
210
+      lastDryWeightDislysis: { id: 0 },
211
+      headNurses: [],
212
+      lastDialysisPrescribe: { id: 0 },
213
+      temp_schedual: null,
214
+      date:''
100 215
     };
101 216
   },
102 217
   props: {
103 218
     schedules: {
104 219
       type: Array
105
-    }
220
+    },
221
+    patientStateVal:Number
106 222
   },
107 223
   methods: {
108 224
     stateColor: function(schedual) {
@@ -252,8 +368,252 @@ export default {
252 368
           patient_name: schedual.patient.name
253 369
         }
254 370
       });
371
+    },
372
+    //
373
+    getScheduleDetail: function() {
374
+      var dateStr = parseTime(this.date, "{y}-{m}-{d}");
375
+      this.doctor_advices = [];
376
+      getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
377
+        var resp = rs.data;
378
+        if (resp.state == 1) {
379
+          var patient = resp.data.patient; // 患者信息
380
+          console.log("患者信息",patient)
381
+          var schedual = resp.data.schedual; // 患者排班信息
382
+          var prescription = resp.data.prescription; // 透析处方
383
+          if(prescription!=null){
384
+              if(prescription.body_fluid == -2 ){
385
+                 prescription.body_fluid = 0
386
+             }
387
+          }
388
+          console.log("透析处方",prescription)
389
+          var solution = resp.data.solution; // 透析方案
390
+          var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
391
+          console.log("receiver_treatment_access",receiver_treatment_access)
392
+          var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
393
+          console.log("透前评估",predialysis_evaluation)
394
+           if(predialysis_evaluation !=null){
395
+             if(predialysis_evaluation.blood_access_part_id == -2){
396
+                predialysis_evaluation.blood_access_part_id = 0
397
+             }
398
+           }
399
+          var doctor_advices = resp.data.doctor_advices; // 临时医嘱
400
+          //console.log("力气-------", doctor_advices);
401
+          var double_check = resp.data.double_check; // 双人核对
402
+          var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
403
+          //console.log("透后品谷数", assessment_after_dislysis);
404
+          var treatment_summary = resp.data.treatment_summary; // 治疗小结
405
+          var monitor_records = resp.data.monitor_records; // 透析监测
406
+          var dialysis_order = resp.data.dialysis_order; // 透析记录
407
+
408
+          var niprocart_info = resp.data.niprocart_info;
409
+          var jms_info = resp.data.jms_info;
410
+          var fistula_needle_set_info = resp.data.fistula_needle_set_info;
411
+          var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info;
412
+          var hemoperfusion_info = resp.data.hemoperfusion_info;
413
+          var dialyser_sterilised_info = resp.data.dialyser_sterilised_info;
414
+          var filtryzer_info = resp.data.filtryzer_info;
415
+          var dialyzers_info = resp.data.dialyzers_info;
416
+          var injector_info = resp.data.injector_info;
417
+          var bloodlines_info = resp.data.bloodlines_info;
418
+          var tubingHemodialysis_info = resp.data.tubingHemodialysis_info;
419
+          var safe_package_info = resp.data.safe_package_info;
420
+          var aliquid_info = resp.data.aliquid_info;
421
+
422
+          var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
423
+          console.log("上次透前评估",lastPredialysisEvaluation)
424
+          if(lastPredialysisEvaluation !=null){
425
+             if(lastPredialysisEvaluation.blood_access_part_id == -2){
426
+               lastPredialysisEvaluation.blood_access_part_id = 0
427
+             }
428
+          }
429
+          var lastMonitorRecord = resp.data.lastMonitorRecord;
430
+          var lastAssessmentAfterDislysis =
431
+            resp.data.lastAssessmentAfterDislysis;
432
+          var lastDialysisPrescribe = resp.data.lastDialysisPrescribe;
433
+          var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
434
+
435
+          var system_prescribe = resp.data.system_prescribe;
436
+
437
+          
438
+          this.$refs.prescription.setLastRecord(
439
+            schedual,
440
+            lastAssessmentAfterDislysis,
441
+            lastPredialysisEvaluation,
442
+            lastDialysisPrescribe,
443
+            lastDryWeightDislysis,
444
+            system_prescribe
445
+          );
446
+
447
+          var headNurses = resp.data.headNurse;
448
+
449
+          var config = resp.data.config;
450
+          this.lastPredialysisEvaluation = lastPredialysisEvaluation;
451
+          this.lastMonitorRecord = lastMonitorRecord;
452
+          this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis;
453
+          this.lastDialysisPrescribe = lastDialysisPrescribe;
454
+          this.lastDryWeightDislysis = lastDryWeightDislysis;
455
+          this.headNurses = headNurses;
456
+          this.system_prescribe = system_prescribe;
457
+
458
+          this.niprocart_info = niprocart_info;
459
+          this.jms_info = jms_info;
460
+          this.fistula_needle_set_info = fistula_needle_set_info;
461
+          this.fistula_needle_set_16_info = fistula_needle_set_16_info;
462
+          this.hemoperfusion_info = hemoperfusion_info;
463
+          this.dialyser_sterilised_info = dialyser_sterilised_info;
464
+          this.filtryzer_info = filtryzer_info;
465
+          this.dialyzers_info = dialyzers_info;
466
+          this.injector_info = injector_info;
467
+          this.bloodlines_info = bloodlines_info;
468
+          this.tubingHemodialysis_info = tubingHemodialysis_info;
469
+          this.safe_package_info = safe_package_info;
470
+          this.aliquid_info = aliquid_info;
471
+          this.config = config;
472
+
473
+          this.patient = patient;
474
+          this.schedual = schedual == null ? { id: 0 } : schedual;
475
+          this.prescription = prescription == null ? { id: 0 } : prescription;
476
+          console.log('this.prescription',this.prescription)
477
+          this.solution = solution == null ? { id: 0 } : solution;
478
+          console.log('this.solution',this.solution)
479
+          this.receiver_treatment_access =
480
+            receiver_treatment_access == null
481
+              ? { id: 0 }
482
+              : receiver_treatment_access;
483
+          this.predialysis_evaluation =
484
+            predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation;
485
+          this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
486
+          this.double_check = double_check == null ? { id: 0 } : double_check;
487
+          this.assessment_after_dislysis =
488
+            assessment_after_dislysis == null
489
+              ? { id: 0 }
490
+              : assessment_after_dislysis;
491
+          this.treatment_summary =
492
+            treatment_summary == null ? { id: 0 } : treatment_summary;
493
+          this.monitor_records = monitor_records == null ? [] : monitor_records;
494
+          this.dialysis_order =
495
+            dialysis_order == null ? { id: 0 } : dialysis_order;
496
+
497
+          // this.$refs.stat_order.setAdvices(this.doctor_advices)
498
+          // this.$refs.monitoring.setRecords(this.monitor_records)
499
+
500
+          this.admin_users = resp.data.doctors;
501
+          this.devices = resp.data.devices;
502
+          this.device_numbers = resp.data.device_numbers;
503
+
504
+          
505
+
506
+          var device_map = {};
507
+          for (let index = 0; index < this.devices.length; index++) {
508
+            const device = this.devices[index];
509
+            device_map[device.id] = device;
510
+          }
511
+          this.device_map = device_map;
512
+
513
+          var admin_map = {};
514
+          for (let index = 0; index < this.admin_users.length; index++) {
515
+            const admin = this.admin_users[index];
516
+            admin_map[admin.id] = admin;
517
+          }
518
+          this.admin_user_map = admin_map;
519
+
520
+          var device_number_map = {};
521
+          for (let index = 0; index < this.device_numbers.length; index++) {
522
+            const device_number = this.device_numbers[index];
523
+            device_number_map[device_number.id] = device_number;
524
+          }
525
+          this.device_number_map = device_number_map;
526
+        } else {
527
+          this.$message.error(resp.msg);
528
+        }
529
+
530
+        if (this.lastDialysisPrescribe != null) {
531
+          delete this.lastDialysisPrescribe.target_ultrafiltration;
532
+        }
533
+        if (this.solution != null) {
534
+          delete this.solution.target_ultrafiltration;
535
+        }
536
+      });
537
+    },
538
+    getLongAdvice() {
539
+      let params = {
540
+        patient_id: this.patient_id
541
+      };
542
+      getLongAdvice(params).then(rs => {
543
+        var resp = rs.data;
544
+        if (resp.state == 1) {
545
+          var status = parseInt(resp.data.status);
546
+
547
+          switch (status) {
548
+            case 2:
549
+              var totalAdvice = resp.data.advices;
550
+              var longAdvicesTwo = resp.data.advices_two;
551
+              var waitUploadAdvices = [];
552
+              for (let i = 0; i < totalAdvice.length; i++) {
553
+                totalAdvice[i]["isCheck"] = 1;
554
+              }
555
+
556
+              for (let i = 0; i < totalAdvice.length; i++) {
557
+                for (let a = 0; a < longAdvicesTwo.length; a++) {
558
+                  if (
559
+                    totalAdvice[i].template_id ==
560
+                      longAdvicesTwo[a].template_id &&
561
+                    totalAdvice[i].frequency_type ==
562
+                      longAdvicesTwo[a].frequency_type
563
+                  ) {
564
+                    totalAdvice[i]["isCheck"] = 0;
565
+                  }
566
+                }
567
+              }
568
+
569
+              for (let i = 0; i < totalAdvice.length; i++) {
570
+                if (totalAdvice[i].isCheck == 1) {
571
+                  waitUploadAdvices.push(totalAdvice[i]);
572
+                }
573
+              }
574
+
575
+              this.is_open = resp.data.is_open_remind;
576
+              this.longAdvices = totalAdvice;
577
+              this.waitUploadAdvices = waitUploadAdvices;
578
+              break;
579
+          }
580
+        } else {
581
+          this.$message.error(resp.msg);
582
+        }
583
+      });
584
+    },
585
+    adviceFunc: function() {
586
+      this.$emit("advice");
587
+    },
588
+    open(schedual){
589
+      this.date = schedual.schedule_date
590
+      this.patient_id = schedual.patient_id
591
+      this.getScheduleDetail()
592
+      this.getLongAdvice()
593
+      this.$refs.prescription.show(this.prescription);
594
+      
595
+    },
596
+    open1(schedual){
597
+      this.date = schedual.schedule_date
598
+      this.patient_id = schedual.patient_id
599
+      this.getScheduleDetail()
600
+      this.getLongAdvice()
601
+      this.$refs.treatmentSummary.show(this.treatment_summary,this.date);
602
+      
603
+    },
604
+    getTime(date){
605
+      date = new Date(date * 1000)
606
+      var Y = date.getFullYear() + '-';
607
+      var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
608
+      var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
609
+      var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
610
+      var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
611
+      var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
612
+      
613
+      let strDate = h  + ':' + m;
614
+      return strDate;
255 615
     }
256
-  }
616
+  },
257 617
 };
258 618
 </script>
259 619
 
@@ -292,14 +652,15 @@ export default {
292 652
   }
293 653
   .kehu {
294 654
     @include display-flex;
295
-    @include align-items-center;
655
+    // @include align-items-center;
296 656
     @include text-align;
297 657
     @include justify-content-between;
298 658
     border-bottom: 1px #e5e5e5 solid;
299 659
     padding: 0 0 10px 20px;
300 660
     .tx {
301 661
       @include display-flex;
302
-      @include align-items-center;
662
+      // @include align-items-center;
663
+      width: 60%;
303 664
       img {
304 665
         width: 45px;
305 666
         height: 45px;
@@ -308,14 +669,18 @@ export default {
308 669
         margin: 0 15px 0 0;
309 670
       }
310 671
       .right {
311
-        float: left;
312
-        text-align: left;
672
+        // float: left;
673
+        // text-align: left;
674
+        display:flex;
675
+        align-items: center;
676
+        margin-top: 6px;
313 677
         .name {
314 678
           font-size: 15px;
315 679
           color: #34495e;
316 680
           font-weight: bold;
317 681
           height: 20px;
318 682
           line-height: 20px;
683
+          margin-right:10px;
319 684
           .yc {
320 685
             background: #ff7979;
321 686
             color: #fff;
@@ -334,12 +699,36 @@ export default {
334 699
           color: #7b8a97;
335 700
         }
336 701
       }
702
+      .tip1{
703
+        background: #4fc7cb;
704
+        border-radius: 5px;
705
+        text-align: center;
706
+        font-size: 12px;
707
+        display: inline-block;
708
+        width: 60px;
709
+        color: #fff;
710
+        width: 65px;
711
+        height: 24px;
712
+        line-height: 24px;
713
+      }
714
+      .tip2{
715
+        background: #7bce91;
716
+        border-radius: 5px;
717
+        text-align: center;
718
+        font-size: 12px;
719
+        display: inline-block;
720
+        width: 60px;
721
+        color: #fff;
722
+        width: 65px;
723
+        height: 24px;
724
+        line-height: 24px;
725
+      }
337 726
     }
338 727
 
339 728
     .online {
340 729
       text-align: center;
341
-      width: 50%;
342
-      border-left: 1px #e5e5e5 solid;
730
+      width: 30%;
731
+      // border-left: 1px #e5e5e5 solid;
343 732
       p {
344 733
         background: #c6cdd2;
345 734
         color: #fff;
@@ -349,6 +738,7 @@ export default {
349 738
         border-radius: 4px;
350 739
         margin: 0 auto;
351 740
         font-size: 12px;
741
+        margin-top:4px;
352 742
       }
353 743
       .blue {
354 744
         background: $main-color;

+ 210 - 65
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -1203,8 +1203,14 @@ export default {
1203 1203
         'dialyzer_perfusion_apparatus'
1204 1204
       )
1205 1205
       console.log('灌流器', this.dialyzerPerfusionApparatus)
1206
-      var date = this.$route.query && this.$route.query.date
1207
-      this.record_date = uParseTime(date, '{y}-{m}-{d}')
1206
+      if(this.$route.query && this.$route.query.date){
1207
+        var date = this.$route.query && this.$route.query.date
1208
+        this.record_date = uParseTime(date, '{y}-{m}-{d}')
1209
+      }else{
1210
+        var date = schedual.schedule_date
1211
+        this.record_date = uParseTime(date, '{y}-{m}-{d}')
1212
+      }
1213
+      
1208 1214
 
1209 1215
       if (
1210 1216
         this.prescription != null &&
@@ -3240,73 +3246,212 @@ export default {
3240 3246
       //   this.dialysisPrescription.anticoagulant_zongliang = "";
3241 3247
       // }
3242 3248
     },
3243
-    'prescription.id': function() {
3244
-      if (this.prescription.id > 0) {
3245
-        for (var index in this.dialysisPrescription) {
3246
-          this.dialysisPrescription[index] = this.prescription[index]
3247
-        }
3249
+    'prescription.id':{
3250
+      immediate: true,
3251
+      deep:true,
3252
+      handler(oldVal,newVal) {
3253
+        if(oldVal == newVal){
3254
+          for (var index in this.dialysisPrescription) {
3255
+            this.dialysisPrescription[index] = this.prescription[index]
3256
+          }
3248 3257
 
3249
-        if (this.prescription['dialysate_formulation'] == 0) {
3250
-          this.dialysisPrescription['dialysate_formulation'] = ''
3251
-        }
3258
+          if (this.prescription['dialysate_formulation'] == 0) {
3259
+            this.dialysisPrescription['dialysate_formulation'] = ''
3260
+          }
3252 3261
 
3253
-        if (this.prescription['anticoagulant'] == 0) {
3254
-          this.dialysisPrescription['anticoagulant'] = ''
3255
-        }
3262
+          if (this.prescription['anticoagulant'] == 0) {
3263
+            this.dialysisPrescription['anticoagulant'] = ''
3264
+          }
3256 3265
 
3257
-        if (this.prescription['dialysis_duration_hour'] == 0) {
3258
-          this.dialysisPrescription['dialysis_duration_hour'] = ''
3259
-        }
3260
-        if (this.prescription['dialysis_duration_minute'] == 0) {
3261
-          this.dialysisPrescription['dialysis_duration_minute'] = ''
3262
-        }
3263
-        if (this.prescription['blood_flow_volume'] == 0) {
3264
-          this.dialysisPrescription['blood_flow_volume'] = ''
3265
-        }
3266
-        if (this.prescription['target_ultrafiltration'] == 0) {
3267
-          this.dialysisPrescription['target_ultrafiltration'] = ''
3268
-        }
3269
-        if (this.prescription['dialysate_temperature'] == 0) {
3270
-          this.dialysisPrescription['dialysate_temperature'] = ''
3271
-        }
3272
-        if (this.prescription['anticoagulant_shouji'] == 0) {
3273
-          this.dialysisPrescription['anticoagulant_shouji'] = ''
3274
-        }
3275
-        if (this.prescription['anticoagulant_weichi'] == 0) {
3276
-          this.dialysisPrescription['anticoagulant_weichi'] = ''
3277
-        }
3278
-        if (this.prescription['anticoagulant_zongliang'] == 0) {
3279
-          this.dialysisPrescription['anticoagulant_zongliang'] = ''
3280
-        }
3281
-        if (this.prescription['anticoagulant_gaijiliang'] == 0) {
3282
-          this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
3283
-        }
3284
-        if (this.prescription['kalium'] == 0) {
3285
-          this.dialysisPrescription['kalium'] = ''
3286
-        }
3287
-        if (this.prescription['sodium'] == 0) {
3288
-          this.dialysisPrescription['sodium'] = ''
3289
-        }
3290
-        if (this.prescription['calcium'] == 0) {
3291
-          this.dialysisPrescription['calcium'] = ''
3292
-        }
3293
-        if (this.prescription['bicarbonate'] == 0) {
3294
-          this.dialysisPrescription['bicarbonate'] = ''
3295
-        }
3296
-        if (this.prescription['glucose'] == 0) {
3297
-          this.dialysisPrescription['glucose'] = ''
3298
-        }
3299
-        if (this.prescription['dialysate_flow'] == 0) {
3300
-          this.dialysisPrescription['dialysate_flow'] = ''
3301
-        }
3302
-        if (this.prescription['conductivity'] == 0) {
3303
-          this.dialysisPrescription['conductivity'] = ''
3304
-        }
3305
-        if (this.prescription['replacement_total'] == 0) {
3306
-          this.dialysisPrescription['replacement_total'] = ''
3266
+          if (this.prescription['dialysis_duration_hour'] == 0) {
3267
+            this.dialysisPrescription['dialysis_duration_hour'] = ''
3268
+          }
3269
+          if (this.prescription['dialysis_duration_minute'] == 0) {
3270
+            this.dialysisPrescription['dialysis_duration_minute'] = ''
3271
+          }
3272
+          if (this.prescription['blood_flow_volume'] == 0) {
3273
+            this.dialysisPrescription['blood_flow_volume'] = ''
3274
+          }
3275
+          if (this.prescription['target_ultrafiltration'] == 0) {
3276
+            this.dialysisPrescription['target_ultrafiltration'] = ''
3277
+          }
3278
+          if (this.prescription['dialysate_temperature'] == 0) {
3279
+            this.dialysisPrescription['dialysate_temperature'] = ''
3280
+          }
3281
+          if (this.prescription['anticoagulant_shouji'] == 0) {
3282
+            this.dialysisPrescription['anticoagulant_shouji'] = ''
3283
+          }
3284
+          if (this.prescription['anticoagulant_weichi'] == 0) {
3285
+            this.dialysisPrescription['anticoagulant_weichi'] = ''
3286
+          }
3287
+          if (this.prescription['anticoagulant_zongliang'] == 0) {
3288
+            this.dialysisPrescription['anticoagulant_zongliang'] = ''
3289
+          }
3290
+          if (this.prescription['anticoagulant_gaijiliang'] == 0) {
3291
+            this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
3292
+          }
3293
+          if (this.prescription['kalium'] == 0) {
3294
+            this.dialysisPrescription['kalium'] = ''
3295
+          }
3296
+          if (this.prescription['sodium'] == 0) {
3297
+            this.dialysisPrescription['sodium'] = ''
3298
+          }
3299
+          if (this.prescription['calcium'] == 0) {
3300
+            this.dialysisPrescription['calcium'] = ''
3301
+          }
3302
+          if (this.prescription['bicarbonate'] == 0) {
3303
+            this.dialysisPrescription['bicarbonate'] = ''
3304
+          }
3305
+          if (this.prescription['glucose'] == 0) {
3306
+            this.dialysisPrescription['glucose'] = ''
3307
+          }
3308
+          if (this.prescription['dialysate_flow'] == 0) {
3309
+            this.dialysisPrescription['dialysate_flow'] = ''
3310
+          }
3311
+          if (this.prescription['conductivity'] == 0) {
3312
+            this.dialysisPrescription['conductivity'] = ''
3313
+          }
3314
+          if (this.prescription['replacement_total'] == 0) {
3315
+            this.dialysisPrescription['replacement_total'] = ''
3316
+          }
3317
+          if (this.prescription['target_ktv'] == 0) {
3318
+            this.dialysisPrescription['target_ktv'] = ''
3319
+          }
3307 3320
         }
3308
-        if (this.prescription['target_ktv'] == 0) {
3309
-          this.dialysisPrescription['target_ktv'] = ''
3321
+        if (this.prescription.id > 0) {
3322
+          for (var index in this.dialysisPrescription) {
3323
+            this.dialysisPrescription[index] = this.prescription[index]
3324
+          }
3325
+
3326
+          if (this.prescription['dialysate_formulation'] == 0) {
3327
+            this.dialysisPrescription['dialysate_formulation'] = ''
3328
+          }
3329
+
3330
+          if (this.prescription['anticoagulant'] == 0) {
3331
+            this.dialysisPrescription['anticoagulant'] = ''
3332
+          }
3333
+
3334
+          if (this.prescription['dialysis_duration_hour'] == 0) {
3335
+            this.dialysisPrescription['dialysis_duration_hour'] = ''
3336
+          }
3337
+          if (this.prescription['dialysis_duration_minute'] == 0) {
3338
+            this.dialysisPrescription['dialysis_duration_minute'] = ''
3339
+          }
3340
+          if (this.prescription['blood_flow_volume'] == 0) {
3341
+            this.dialysisPrescription['blood_flow_volume'] = ''
3342
+          }
3343
+          if (this.prescription['target_ultrafiltration'] == 0) {
3344
+            this.dialysisPrescription['target_ultrafiltration'] = ''
3345
+          }
3346
+          if (this.prescription['dialysate_temperature'] == 0) {
3347
+            this.dialysisPrescription['dialysate_temperature'] = ''
3348
+          }
3349
+          if (this.prescription['anticoagulant_shouji'] == 0) {
3350
+            this.dialysisPrescription['anticoagulant_shouji'] = ''
3351
+          }
3352
+          if (this.prescription['anticoagulant_weichi'] == 0) {
3353
+            this.dialysisPrescription['anticoagulant_weichi'] = ''
3354
+          }
3355
+          if (this.prescription['anticoagulant_zongliang'] == 0) {
3356
+            this.dialysisPrescription['anticoagulant_zongliang'] = ''
3357
+          }
3358
+          if (this.prescription['anticoagulant_gaijiliang'] == 0) {
3359
+            this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
3360
+          }
3361
+          if (this.prescription['kalium'] == 0) {
3362
+            this.dialysisPrescription['kalium'] = ''
3363
+          }
3364
+          if (this.prescription['sodium'] == 0) {
3365
+            this.dialysisPrescription['sodium'] = ''
3366
+          }
3367
+          if (this.prescription['calcium'] == 0) {
3368
+            this.dialysisPrescription['calcium'] = ''
3369
+          }
3370
+          if (this.prescription['bicarbonate'] == 0) {
3371
+            this.dialysisPrescription['bicarbonate'] = ''
3372
+          }
3373
+          if (this.prescription['glucose'] == 0) {
3374
+            this.dialysisPrescription['glucose'] = ''
3375
+          }
3376
+          if (this.prescription['dialysate_flow'] == 0) {
3377
+            this.dialysisPrescription['dialysate_flow'] = ''
3378
+          }
3379
+          if (this.prescription['conductivity'] == 0) {
3380
+            this.dialysisPrescription['conductivity'] = ''
3381
+          }
3382
+          if (this.prescription['replacement_total'] == 0) {
3383
+            this.dialysisPrescription['replacement_total'] = ''
3384
+          }
3385
+          if (this.prescription['target_ktv'] == 0) {
3386
+            this.dialysisPrescription['target_ktv'] = ''
3387
+          }
3388
+        }else if(this.prescription.id == 0){
3389
+          for (var index in this.dialysisPrescription) {
3390
+            this.dialysisPrescription[index] = this.prescription[index]
3391
+          }
3392
+
3393
+          if (this.prescription['dialysate_formulation'] == 0) {
3394
+            this.dialysisPrescription['dialysate_formulation'] = ''
3395
+          }
3396
+
3397
+          if (this.prescription['anticoagulant'] == 0) {
3398
+            this.dialysisPrescription['anticoagulant'] = ''
3399
+          }
3400
+
3401
+          if (this.prescription['dialysis_duration_hour'] == 0) {
3402
+            this.dialysisPrescription['dialysis_duration_hour'] = ''
3403
+          }
3404
+          if (this.prescription['dialysis_duration_minute'] == 0) {
3405
+            this.dialysisPrescription['dialysis_duration_minute'] = ''
3406
+          }
3407
+          if (this.prescription['blood_flow_volume'] == 0) {
3408
+            this.dialysisPrescription['blood_flow_volume'] = ''
3409
+          }
3410
+          if (this.prescription['target_ultrafiltration'] == 0) {
3411
+            this.dialysisPrescription['target_ultrafiltration'] = ''
3412
+          }
3413
+          if (this.prescription['dialysate_temperature'] == 0) {
3414
+            this.dialysisPrescription['dialysate_temperature'] = ''
3415
+          }
3416
+          if (this.prescription['anticoagulant_shouji'] == 0) {
3417
+            this.dialysisPrescription['anticoagulant_shouji'] = ''
3418
+          }
3419
+          if (this.prescription['anticoagulant_weichi'] == 0) {
3420
+            this.dialysisPrescription['anticoagulant_weichi'] = ''
3421
+          }
3422
+          if (this.prescription['anticoagulant_zongliang'] == 0) {
3423
+            this.dialysisPrescription['anticoagulant_zongliang'] = ''
3424
+          }
3425
+          if (this.prescription['anticoagulant_gaijiliang'] == 0) {
3426
+            this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
3427
+          }
3428
+          if (this.prescription['kalium'] == 0) {
3429
+            this.dialysisPrescription['kalium'] = ''
3430
+          }
3431
+          if (this.prescription['sodium'] == 0) {
3432
+            this.dialysisPrescription['sodium'] = ''
3433
+          }
3434
+          if (this.prescription['calcium'] == 0) {
3435
+            this.dialysisPrescription['calcium'] = ''
3436
+          }
3437
+          if (this.prescription['bicarbonate'] == 0) {
3438
+            this.dialysisPrescription['bicarbonate'] = ''
3439
+          }
3440
+          if (this.prescription['glucose'] == 0) {
3441
+            this.dialysisPrescription['glucose'] = ''
3442
+          }
3443
+          if (this.prescription['dialysate_flow'] == 0) {
3444
+            this.dialysisPrescription['dialysate_flow'] = ''
3445
+          }
3446
+          if (this.prescription['conductivity'] == 0) {
3447
+            this.dialysisPrescription['conductivity'] = ''
3448
+          }
3449
+          if (this.prescription['replacement_total'] == 0) {
3450
+            this.dialysisPrescription['replacement_total'] = ''
3451
+          }
3452
+          if (this.prescription['target_ktv'] == 0) {
3453
+            this.dialysisPrescription['target_ktv'] = ''
3454
+          }
3310 3455
         }
3311 3456
       }
3312 3457
     },

+ 56 - 9
src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue View File

@@ -148,7 +148,7 @@ export default {
148 148
       default: () => {
149 149
         return { id: 0 }
150 150
       }
151
-    }
151
+    },
152 152
   },
153 153
   data() {
154 154
     return {
@@ -174,13 +174,22 @@ export default {
174 174
         zl_doctor: '',
175 175
         nursing_record: '',
176 176
         special_record: ''
177
-      }
177
+      },
178
+      //
179
+      date:''
178 180
     }
179 181
   },
180 182
   methods: {
181
-    show(record) {
183
+    show(record,date) {
182 184
       this.isVisibility = true
183 185
       this.record = record
186
+      console.log(111111111111111,date)
187
+      if(date){
188
+        this.date = date
189
+        this.record_date = uParseTime(this.date, '{y}-{m}-{d}')
190
+        console.log(22222222222,this.record_date)
191
+      }
192
+      
184 193
       console.log('治疗小结', record)
185 194
       this.getPermission()
186 195
     },
@@ -364,10 +373,43 @@ export default {
364 373
   },
365 374
   watch: {
366 375
     isVisibility(val) {},
367
-    'treatment_summary.id': function() {
368
-      if (this.treatment_summary.id > 0) {
369
-        for (var index in this.treatmentSummary) {
370
-          this.treatmentSummary[index] = this.treatment_summary[index]
376
+    'treatment_summary.id': {
377
+      immediate: true,
378
+      deep:true,
379
+      handler(oldVal,newVal) {
380
+        if(oldVal == newVal){
381
+          for (var index in this.treatmentSummary) {
382
+            this.treatmentSummary[index] = this.treatment_summary[index]
383
+          }
384
+        }
385
+        if (this.treatment_summary.id > 0) {
386
+          for (var index in this.treatmentSummary) {
387
+            this.value = ''
388
+            this.value2 = ''
389
+            this.value3 = ''
390
+            this.value4 = ''
391
+            this.treatmentSummary[index] = this.treatment_summary[index]
392
+          }
393
+        }else if(this.treatment_summary.id == 0){
394
+          for (var index in this.treatmentSummary) {
395
+            // this.treatmentSummary[index] = this.treatment_summary[index]
396
+            this.value = ''
397
+            this.value2 = ''
398
+            this.value3 = ''
399
+            this.value4 = ''
400
+            this.treatmentSummary = {
401
+              mission: '',
402
+              dialysis_summary: '',
403
+              sj_nurse: '',
404
+              zl_nurse: '',
405
+              hd_nurse: '',
406
+              xj_nurse: '',
407
+              zl_doctor: '',
408
+              nursing_record: '',
409
+              special_record: ''
410
+            }
411
+          }
412
+          
371 413
         }
372 414
       }
373 415
     }
@@ -380,8 +422,13 @@ export default {
380 422
 
381 423
     this.specialRecord = getDataConfig('special_record', 'special_record')
382 424
 
383
-    var date = this.$route.query && this.$route.query.date
384
-    this.record_date = uParseTime(date, '{y}-{m}-{d}')
425
+    // var date = this.$route.query && this.$route.query.date
426
+    // this.record_date = uParseTime(date, '{y}-{m}-{d}')
427
+
428
+    if(this.$route.query && this.$route.query.date){
429
+      var date = this.$route.query && this.$route.query.date
430
+      this.record_date = uParseTime(date, '{y}-{m}-{d}')
431
+    }
385 432
   }
386 433
 }
387 434
 </script>

File diff suppressed because it is too large
+ 1020 - 229
src/xt_pages/dialysis/details/index.vue


+ 295 - 28
src/xt_pages/dialysis/schedualPatient.vue View File

@@ -4,12 +4,12 @@
4 4
     <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
   </div>
6 6
   <div class="app-container">
7
-    <div class="cell clearfix">
8
-      <!-- <label class="title"><span class="name">病人查询</span> : </label> -->
7
+    <!-- <div class="cell clearfix">
8
+      <label class="title"><span class="name">病人查询</span> : </label>
9 9
       <el-input size="small" style="width: 280px;" v-model.trim="search_input" class="filter-item"/>
10 10
       <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
11
-    </div>
12
-    <div class="cell clearfix">
11
+    </div> -->
12
+    <!-- <div class="cell clearfix">
13 13
       <label class="title"><span class="name">日期查询</span> : </label>
14 14
       <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
15 15
     </div>
@@ -30,12 +30,54 @@
30 30
           </li>
31 31
         </ul>
32 32
       </div>
33
+    </div> -->
34
+    <div class="cell clearfix">
35
+      <label class="title"><span class="name">患者状态</span> : </label>
36
+      <div class="time ">
37
+        <ul class="">
38
+          <li v-for="option in patient_state" :key="option.value" @click="handleStateChange(option.value)" :class="patientStateVal == option.value ? 'active' : ''" >{{option.label}}
39
+          </li>
40
+        </ul>
41
+      </div>
42
+    </div>
43
+    <div class="cell clearfix">
44
+      <label class="title"><span class="name">治疗状态</span> : </label>
45
+      <div class="time ">
46
+        <ul class="">
47
+          <li v-for="option in treat_state" :key="option.value" @click="handleTreatChange(option.value)" :class="treatStateVal == option.value ? 'active' : ''" >{{option.label}}
48
+          </li>
49
+        </ul>
50
+      </div>
51
+    </div>
52
+    <div class="cell clearfix" style="margin-bottom:10px;">
53
+      <label class="title"><span class="name">其他查询</span> : </label>
54
+      <el-select v-model="schedule_type_selected" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
55
+        <el-option
56
+          v-for="item in schedule_type_options"
57
+          :key="item.value"
58
+          :label="item.text"
59
+          :value="item.value">
60
+        </el-option>
61
+      </el-select>
62
+      <el-select v-model="zone_selected" placeholder="分区" style="margin-right:10px;" @change="handleZoneChange">
63
+        <el-option
64
+          v-for="item in zone_options"
65
+          :key="item.id"
66
+          :label="item.text"
67
+          :value="item.id">
68
+        </el-option>
69
+      </el-select>
70
+      <label class="title"><span class="name">日期查询</span> : </label>
71
+      <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
72
+      <el-input size="small" style="width: 180px;" v-model.trim="search_input" class="filter-item"/>
73
+      <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
33 74
     </div>
34 75
 
35 76
     <div class="PatientArea">
36
-      <div v-for="zone_schedule in filtedSchedules" :key="zone_schedule.zone_id" class="list clearfix">
37
-        <h3 class="title">{{zone_schedule.zone_name}}</h3>
38
-        <patient-box :schedules="zone_schedule.schedules"></patient-box>
77
+      <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix" style="display:flex;">
78
+        <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
79
+        <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;">{{zone_schedule.zone_name}}</div>
80
+        <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' style="flex:1"></patient-box>
39 81
       </div>
40 82
       <div class="NoData" v-show="filtedSchedules.length == 0">
41 83
         <img src="@/assets/img/data.jpg" alt="">
@@ -106,7 +148,24 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
106 148
 
107 149
         // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
108 150
         search_keyword: '', // 确定用于搜索的关键字
109
-        search_input: '' // 输入中的关键字
151
+        search_input: '', // 输入中的关键字
152
+
153
+        //
154
+        patient_state:[
155
+          {value: 0,label: '全部'},
156
+          {value: 1,label: '已签到'},
157
+          {value: 2,label: '未签到'},
158
+          {value: 3,label: '已上机'},
159
+          {value: 4,label: '已下机'},
160
+        ],
161
+        patientStateVal: 0,
162
+        treat_state:[
163
+          {value: 0,label: '全部'},
164
+          {value: 1,label: '待开处方'},
165
+          {value: 2,label: '待开小结'},
166
+        ],
167
+        treatStateVal: 0,
168
+        allPatient:[]
110 169
       }
111 170
     },
112 171
     computed: {
@@ -187,38 +246,48 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
187 246
     created() {
188 247
       var schedule_type_selected = this.$store.getters.schedule_type_selected
189 248
       var zone_selected = this.$store.getters.zone_selected
249
+      var patient_state_selected = this.$store.getters.patient_state_selected
250
+      var treat_state_selected = this.$store.getters.treat_state_selected
190 251
       if (schedule_type_selected) {
191 252
         this.schedule_type_selected = schedule_type_selected.schedule_type_selected
192 253
       }
193 254
       if (zone_selected) {
194 255
         this.zone_selected = zone_selected.zone_selected
195 256
       }
257
+      if (patient_state_selected) {
258
+        this.patientStateVal = patient_state_selected.patient_state_selected
259
+      }
260
+      if (treat_state_selected) {
261
+        this.treatStateVal = treat_state_selected.treat_state_selected
262
+      }
196 263
       this.getInitData()
197 264
     },
198 265
     methods: {
199
-      handletimeType: function(index) {
200
-        this.schedule_type_selected = index
201
-        this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
202
-        this.search_keyword = this.search_input = ''
203
-        // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
204
-        //   zone: this.zone_selected,
205
-        //   schedule_type: this.schedule_type_selected,
206
-        //   schedule_date: this.selected_date,
207
-        // })
208
-      },
209
-      handleZoneChange: function(index) {
210
-        this.zone_selected = index
211
-        this.$store.dispatch('SetZoneSelected', { zone_selected: index })
212
-        this.search_keyword = this.search_input = ''
213
-        // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
214
-        //   zone: this.zone_selected,
215
-        //   schedule_type: this.schedule_type_selected,
216
-        //   schedule_date: this.selected_date,
217
-        // })
218
-      },
266
+      // handletimeType: function(index) {
267
+      //   this.schedule_type_selected = index
268
+      //   this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
269
+      //   this.search_keyword = this.search_input = ''
270
+      //   // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
271
+      //   //   zone: this.zone_selected,
272
+      //   //   schedule_type: this.schedule_type_selected,
273
+      //   //   schedule_date: this.selected_date,
274
+      //   // })
275
+      // },
276
+      // handleZoneChange: function(index) {
277
+      //   this.zone_selected = index
278
+      //   this.$store.dispatch('SetZoneSelected', { zone_selected: index })
279
+      //   this.search_keyword = this.search_input = ''
280
+      //   // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
281
+      //   //   zone: this.zone_selected,
282
+      //   //   schedule_type: this.schedule_type_selected,
283
+      //   //   schedule_date: this.selected_date,
284
+      //   // })
285
+      // },
219 286
       handleScheduleDateChange: function() {
220 287
         this.zone_selected = 0
221 288
         this.schedule_type_selected = 0
289
+        this.patientStateVal = 0
290
+        this.treatStateVal = 0
222 291
         this.search_keyword = this.search_input = ''
223 292
         // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
224 293
         //   zone: this.zone_selected,
@@ -231,6 +300,14 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
231 300
         this.search_keyword = this.search_input
232 301
         this.schedule_type_selected = 0
233 302
         this.zone_selected = 0
303
+        this.treatStateVal = 0
304
+        this.patientStateVal = 0
305
+        if(this.search_input != ''){
306
+          this.allPatient = this.filtedSchedules
307
+        }else{
308
+          this.getData()
309
+        }
310
+        
234 311
       },
235 312
       getInitData: function() {
236 313
         getDialysisRecordInitData().then(rs => {
@@ -245,6 +322,8 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
245 322
             }
246 323
             this.zone_options = zone_options
247 324
             this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
325
+            this.getData()
326
+            console.log(1111111111111,this.zone_schedules)
248 327
           } else {
249 328
             this.$message.error(resp.msg)
250 329
           }
@@ -286,6 +365,194 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
286 365
           zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
287 366
         }
288 367
         return zone_schedules
368
+      },
369
+
370
+      //
371
+      handleStateChange: function(index) {
372
+        this.patientStateVal = index
373
+        this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
374
+        this.search_keyword = this.search_input = ''
375
+        this.getData()
376
+      },
377
+      handleTreatChange: function(index) {
378
+        this.treatStateVal = index
379
+        this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
380
+        this.search_keyword = this.search_input = ''
381
+        this.getData()
382
+      },
383
+      handletimeType: function(index) {
384
+        this.schedule_type_selected = index
385
+        this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
386
+        this.search_keyword = this.search_input = ''
387
+        this.getData()
388
+      },
389
+      //分区
390
+      handleZoneChange: function(index) {
391
+        this.zone_selected = index
392
+        this.$store.dispatch('SetZoneSelected', { zone_selected: index })
393
+        this.search_keyword = this.search_input = ''
394
+        this.getData()
395
+      },
396
+      getData(){
397
+    
398
+        let patientArr = []
399
+        patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
400
+        // for (let i = 0; i < patientArr.length; i++) {
401
+          
402
+        //   for (let j = 0; j < patientArr[i].schedules.length; j++) {
403
+        //     if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
404
+        //       // 删除元素后改变i的值
405
+              
406
+        //       console.log("候诊区",patientArr[i].schedules[j])
407
+        //       patientArr[i].schedules.splice(j--, 1);
408
+        //     }
409
+        //   }
410
+        // }
411
+        let arr1 = []
412
+        if(this.patientStateVal == 0){
413
+          arr1 = patientArr
414
+        }else if(this.patientStateVal == 1){
415
+          let arr = []
416
+          arr = patientArr
417
+          for (let i = 0; i <arr.length; i++) {
418
+            for (let j = 0; j < arr[i].schedules.length; j++) {
419
+              if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || arr[i].schedules[j].assessment_before_dislysis.weight_before == '' || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == '')) {
420
+                // 删除元素后改变i的值
421
+                arr[i].schedules.splice(j--, 1);
422
+              }
423
+            }
424
+          }
425
+          console.log("执行1",arr)
426
+          arr1 = arr
427
+        }else if(this.patientStateVal == 2){
428
+          let arr = []
429
+          arr = patientArr
430
+          for (let i = 0; i < arr.length; i++) {
431
+            for (let j = 0; j < arr[i].schedules.length; j++) {
432
+              if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
433
+                // 删除元素后改变i的值
434
+                console.log('几次')
435
+                arr[i].schedules.splice(j--, 1);
436
+              }
437
+            }
438
+          }
439
+          console.log("执行2",arr)
440
+          arr1 = arr
441
+        }else if(this.patientStateVal == 3){
442
+          let arr = []
443
+          arr = patientArr
444
+          for (let i = 0; i <arr.length; i++) {
445
+            for (let j = 0; j < arr[i].schedules.length; j++) {
446
+              if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1))) {
447
+                // 删除元素后改变i的值
448
+                arr[i].schedules.splice(j--, 1);
449
+              }
450
+            }
451
+          }
452
+          console.log("执行1",arr)
453
+          arr1 = arr
454
+        }else if(this.patientStateVal == 4){
455
+          let arr = []
456
+          arr = patientArr
457
+          for (let i = 0; i < arr.length; i++) {
458
+            for (let j = 0; j < arr[i].schedules.length; j++) {
459
+              if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2))) {
460
+                // 删除元素后改变i的值
461
+                arr[i].schedules.splice(j--, 1);
462
+              }
463
+            }
464
+          }
465
+          console.log("执行2",arr)
466
+          arr1 = arr
467
+        }
468
+
469
+        let arr2 = []
470
+        if(this.treatStateVal == 0){
471
+          arr2 = JSON.parse(JSON.stringify(arr1))
472
+        }else if(this.treatStateVal == 1){
473
+          let arr = []
474
+          arr = JSON.parse(JSON.stringify(arr1))
475
+          for (let i = 0; i < arr.length; i++) {
476
+            for (let j = 0; j < arr[i].schedules.length; j++) {
477
+              if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
478
+                // 删除元素后改变i的值
479
+                arr[i].schedules.splice(j--, 1);
480
+              }
481
+            }
482
+          }
483
+          arr2 = arr
484
+        }else if(this.treatStateVal == 2){
485
+          let arr = []
486
+          arr = JSON.parse(JSON.stringify(arr1))
487
+          for (let i = 0; i < arr.length; i++) {
488
+            for (let j = 0; j < arr[i].schedules.length; j++) {
489
+              if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
490
+                // 删除元素后改变i的值
491
+                arr[i].schedules.splice(j--, 1);
492
+              }
493
+            }
494
+          }
495
+          arr2 = arr
496
+        }
497
+        
498
+
499
+        let arr3 = []
500
+        if(this.schedule_type_selected == 0){
501
+          arr3 = JSON.parse(JSON.stringify(arr2))
502
+        }else{
503
+          let arr = []
504
+          arr = JSON.parse(JSON.stringify(arr2))
505
+          for (let i = 0; i < arr.length; i++) {
506
+            for (let j = 0; j < arr[i].schedules.length; j++) {
507
+              if (this.schedule_type_selected != arr[i].schedules[j].schedule_type) {
508
+                // 删除元素后改变i的值
509
+                arr[i].schedules.splice(j--, 1);
510
+              }
511
+            }
512
+          }
513
+          arr3 = arr
514
+        }
515
+        
516
+
517
+        let arr4 = []
518
+        if(this.zone_selected == 0){
519
+          arr4 = JSON.parse(JSON.stringify(arr3))
520
+        }else{
521
+          let arr = []
522
+          arr = JSON.parse(JSON.stringify(arr3))
523
+          for (let i = 0; i < arr.length; i++) {
524
+            if (this.zone_selected != arr[i].zone_id) {
525
+              // 删除元素后改变i的值
526
+              arr.splice(i--, 1);
527
+            }
528
+          }
529
+          arr4 = arr
530
+        }
531
+        
532
+        
533
+        if(this.patientStateVal == 1){
534
+          arr4.map((item,index) => {
535
+            if(index != 0){
536
+              arr4[0].schedules.push(...arr4[index].schedules)
537
+              arr4[index].schedules = []
538
+            }
539
+          })
540
+          arr4[0].schedules.map(item => {
541
+            item.created_time = item.assessment_before_dislysis.created_time
542
+          })
543
+          arr4[0].schedules.sort(this.compare('created_time'))
544
+          this.allPatient = arr4
545
+          console.log("arr4",arr4)
546
+        }else{
547
+          this.allPatient = arr4
548
+        }
549
+      },
550
+      compare(property){
551
+        return function(a,b){
552
+          var value1 = a[property];
553
+          var value2 = b[property];
554
+          return value1 - value2;
555
+        }
289 556
       }
290 557
     }
291 558
   }

+ 8 - 2
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue View File

@@ -235,8 +235,14 @@ export default {
235 235
                   //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
236 236
                   var colorList = [
237 237
                     ["#A9E0F3", "#9FBDFC"],
238
-
239
-                    ["#FFD7C0", "#FF9994"]
238
+                    ["#A9E0F3", "#9FBDFC"],
239
+                    ["#A9E0F3", "#9FBDFC"],
240
+                    ["#FFD7C0", "#FF9994"],
241
+                    ["#FFD7C0", "#FF9994"],
242
+                    ["#FFD7C0", "#FF9994"],
243
+                    ["#D7C3FD", "#B3A8F7"],
244
+                    ["#D7C3FD", "#B3A8F7"],
245
+                    ["#D7C3FD", "#B3A8F7"]
240 246
                   ];
241 247
 
242 248
                   var index = params.dataIndex;