csx преди 5 години
родител
ревизия
532b771934
променени са 1 файла, в които са добавени 175 реда и са изтрити 164 реда
  1. 175 164
      src/pages/main/dialog/PrescriptionDialog.vue

+ 175 - 164
src/pages/main/dialog/PrescriptionDialog.vue Целия файл

@@ -327,6 +327,7 @@
327 327
   import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
328 328
   import MultipleSubMenu from './subMenu/multipleSubMenu'
329 329
   import {commitDialysisPrescription, CreateGroupAdvice, GetSolution, postSign, postSolution} from '@/api/dialysis'
330
+  import { calculateAnticoagulantZL} from '@/utils/tools'
330 331
 
331 332
   import {Toast} from 'vant'
332 333
   import {getDataConfig} from '@/utils/data'
@@ -422,6 +423,7 @@
422 423
         msgtip_visibility: false,
423 424
         time: '03:00',
424 425
         timeValue: '',
426
+        tempTimeValue:'',
425 427
         isShowSign: false,
426 428
         anticoagulantsConfit: {},
427 429
         dialysateFormulationOptions: [],
@@ -434,8 +436,8 @@
434 436
           result: [],
435 437
           operators: [],
436 438
 
437
-      },
438
-      is_show: false,
439
+        },
440
+        is_show: false,
439 441
 
440 442
         perfusion_apparatus: {},
441 443
         replacementWays: [],
@@ -587,7 +589,7 @@
587 589
         }
588 590
         this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
589 591
 
590
-        this.dialysisPrescription.dialysis_duration = this.dialysisPrescription.dialysis_duration_hour + '.' + (this.dialysisPrescription.dialysis_duration_minute)
592
+        this.dialysisPrescription.dialysis_duration = parseFloat(this.dialysisPrescription.dialysis_duration_hour) + parseFloat((this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2))
591 593
 
592 594
       },
593 595
       inputFocus: function (event) {
@@ -657,139 +659,139 @@
657 659
             this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus
658 660
             this.propForm.click_ref = 'perfusion_apparatus'
659 661
 
660
-          break
661
-        case 'replacement_way':
662
-          this.propForm.type = 4
663
-          this.isShowDialog = false
664
-          this.propForm.title = '置换方式'
665
-          this.visibility = true
666
-          this.propForm.list = []
667
-          this.propForm.optionList = this.replacementWays
668
-          this.propForm.isMultiple = 1
669
-          this.propForm.selectId = this.dialysisPrescription.replacement_way
670
-          this.propForm.click_ref = 'replacement_way'
662
+            break
663
+          case 'replacement_way':
664
+            this.propForm.type = 4
665
+            this.isShowDialog = false
666
+            this.propForm.title = '置换方式'
667
+            this.visibility = true
668
+            this.propForm.list = []
669
+            this.propForm.optionList = this.replacementWays
670
+            this.propForm.isMultiple = 1
671
+            this.propForm.selectId = this.dialysisPrescription.replacement_way
672
+            this.propForm.click_ref = 'replacement_way'
671 673
 
672 674
             break
673 675
 
674
-        case 'anticoagulant':
675
-          this.propForm.type = 5
676
-          this.isShowDialog = false
677
-          this.propForm.title = '抗疑剂'
678
-          this.visibility = true
679
-          this.propForm.list = []
680
-          this.propForm.optionList = this.anticoagulantsConfit
681
-          this.propForm.isMultiple = 1
682
-          this.propForm.selectId = this.dialysisPrescription.anticoagulant
683
-          this.propForm.click_ref = 'anticoagulant'
684
-          break
685
-        case 'dialysate_formulation':
686
-          this.propForm.type = 6
687
-          this.isShowDialog = false
688
-          this.propForm.title = '透析液配方'
689
-          this.visibility = true
690
-          this.propForm.list = []
691
-          this.propForm.optionList = this.dialysateFormulationOptions
692
-          this.propForm.isMultiple = 1
693
-          this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
694
-          this.propForm.click_ref = 'dialysate_formulation'
695
-          break
696
-        case 'body_fluid':
697
-          this.propForm.type = 7
698
-          this.isShowDialog = false
699
-          this.propForm.title = '体液过多症状'
700
-          this.visibility = true
701
-          this.propForm.list = []
702
-          this.propForm.optionList = this.bodyFluidOptions
703
-          this.propForm.isMultiple = 1
704
-          this.propForm.selectId = this.dialysisPrescription.body_fluid
705
-          this.propForm.click_ref = 'body_fluid'
706
-          break
707
-        case 'special_medicine':
708
-          this.propForm.type = 8
709
-          this.isShowDialog = false
710
-          this.propForm.title = '透析前使用特殊药物'
711
-          this.visibility = true
712
-          this.propForm.list = []
713
-          this.propForm.optionList = this.specialMedicineOptions
714
-          this.propForm.isMultiple = 1
715
-          this.propForm.selectId = this.dialysisPrescription.special_medicine
716
-          this.propForm.click_ref = 'special_medicine'
717
-          break
718
-        case 'displace_liqui_part':
719
-          this.propForm.type = 9
720
-          this.isShowDialog = false
721
-          this.propForm.title = '置换液'
722
-          this.visibility = true
723
-          this.propForm.list = []
724
-          this.propForm.optionList = this.displaceLiquiPartOptions
725
-          this.propForm.isMultiple = 1
726
-          this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
727
-          this.propForm.click_ref = 'displace_liqui_part'
728
-          break
729
-        case 'blood_access':
730
-          this.propForm.type = 10
731
-          this.isShowDialog = false
732
-          this.propForm.title = '血管通路'
733
-          this.visibility = true
734
-          this.propForm.list = []
735
-          this.propForm.optionList = this.bloodAccessOptions
736
-          this.propForm.isMultiple = 1
737
-          this.propForm.selectId = this.dialysisPrescription.blood_access
738
-          this.propForm.click_ref = 'blood_access'
739
-          break
740
-        case 'dialyzer_perfusion_apparatus':
741
-          // this.propForm.type = 11
742
-          // this.isShowDialog = false
743
-          // this.propForm.title = '透析器/灌流器'
744
-          // this.visibility = true
745
-          // this.propForm.list = []
746
-          // this.propForm.optionList = this.bloodAccessOptions
747
-          // this.propForm.isMultiple = 1
748
-          // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
749
-          // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
750
-          // break
751
-
752
-          this.propForm.result = []
753
-          this.isHasOther = 2
754
-          this.propForm.type = 11
755
-          this.isShowDialog = false
756
-          this.propForm.title = '透析器/灌流器'
757
-          this.visibility = true
758
-          this.propForm.list = []
759
-          this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
760
-          this.propForm.optionList = []
761
-          this.propForm.isMultiple = 2
762
-          // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
763
-          if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
764
-            if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
765
-              this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
676
+          case 'anticoagulant':
677
+            this.propForm.type = 5
678
+            this.isShowDialog = false
679
+            this.propForm.title = '抗疑剂'
680
+            this.visibility = true
681
+            this.propForm.list = []
682
+            this.propForm.optionList = this.anticoagulantsConfit
683
+            this.propForm.isMultiple = 1
684
+            this.propForm.selectId = this.dialysisPrescription.anticoagulant
685
+            this.propForm.click_ref = 'anticoagulant'
686
+            break
687
+          case 'dialysate_formulation':
688
+            this.propForm.type = 6
689
+            this.isShowDialog = false
690
+            this.propForm.title = '透析液配方'
691
+            this.visibility = true
692
+            this.propForm.list = []
693
+            this.propForm.optionList = this.dialysateFormulationOptions
694
+            this.propForm.isMultiple = 1
695
+            this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
696
+            this.propForm.click_ref = 'dialysate_formulation'
697
+            break
698
+          case 'body_fluid':
699
+            this.propForm.type = 7
700
+            this.isShowDialog = false
701
+            this.propForm.title = '体液过多症状'
702
+            this.visibility = true
703
+            this.propForm.list = []
704
+            this.propForm.optionList = this.bodyFluidOptions
705
+            this.propForm.isMultiple = 1
706
+            this.propForm.selectId = this.dialysisPrescription.body_fluid
707
+            this.propForm.click_ref = 'body_fluid'
708
+            break
709
+          case 'special_medicine':
710
+            this.propForm.type = 8
711
+            this.isShowDialog = false
712
+            this.propForm.title = '透析前使用特殊药物'
713
+            this.visibility = true
714
+            this.propForm.list = []
715
+            this.propForm.optionList = this.specialMedicineOptions
716
+            this.propForm.isMultiple = 1
717
+            this.propForm.selectId = this.dialysisPrescription.special_medicine
718
+            this.propForm.click_ref = 'special_medicine'
719
+            break
720
+          case 'displace_liqui_part':
721
+            this.propForm.type = 9
722
+            this.isShowDialog = false
723
+            this.propForm.title = '置换液'
724
+            this.visibility = true
725
+            this.propForm.list = []
726
+            this.propForm.optionList = this.displaceLiquiPartOptions
727
+            this.propForm.isMultiple = 1
728
+            this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
729
+            this.propForm.click_ref = 'displace_liqui_part'
730
+            break
731
+          case 'blood_access':
732
+            this.propForm.type = 10
733
+            this.isShowDialog = false
734
+            this.propForm.title = '血管通路'
735
+            this.visibility = true
736
+            this.propForm.list = []
737
+            this.propForm.optionList = this.bloodAccessOptions
738
+            this.propForm.isMultiple = 1
739
+            this.propForm.selectId = this.dialysisPrescription.blood_access
740
+            this.propForm.click_ref = 'blood_access'
741
+            break
742
+          case 'dialyzer_perfusion_apparatus':
743
+            // this.propForm.type = 11
744
+            // this.isShowDialog = false
745
+            // this.propForm.title = '透析器/灌流器'
746
+            // this.visibility = true
747
+            // this.propForm.list = []
748
+            // this.propForm.optionList = this.bloodAccessOptions
749
+            // this.propForm.isMultiple = 1
750
+            // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
751
+            // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
752
+            // break
753
+
754
+            this.propForm.result = []
755
+            this.isHasOther = 2
756
+            this.propForm.type = 11
757
+            this.isShowDialog = false
758
+            this.propForm.title = '透析器/灌流器'
759
+            this.visibility = true
760
+            this.propForm.list = []
761
+            this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
762
+            this.propForm.optionList = []
763
+            this.propForm.isMultiple = 2
764
+            // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
765
+            if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
766
+              if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
767
+                this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
768
+              } else {
769
+                this.propForm.result = []
770
+              }
766 771
             } else {
767 772
               this.propForm.result = []
768 773
             }
769
-          } else {
770
-            this.propForm.result = []
771
-          }
772
-          this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
773
-          break
774
-      }
775
-    },
776
-    menuCancle: function () {
777
-      this.visibility = false
778
-      this.isShowDialog = true
779
-      this.$nextTick(() => {
780
-        if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
781
-          this.$refs[this.propForm.click_ref].scrollIntoView()
774
+            this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
775
+            break
782 776
         }
783
-      })
784
-    },
785
-    menuCancleThree: function () {
786
-      this.advice_visibility = false
787
-      this.isShowDialog = true
788
-    },
789
-    menuMsgTip: function () {
790
-      this.msgtip_visibility = false
791
-      this.isShowDialog = true
792
-    },
777
+      },
778
+      menuCancle: function () {
779
+        this.visibility = false
780
+        this.isShowDialog = true
781
+        this.$nextTick(() => {
782
+          if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
783
+            this.$refs[this.propForm.click_ref].scrollIntoView()
784
+          }
785
+        })
786
+      },
787
+      menuCancleThree: function () {
788
+        this.advice_visibility = false
789
+        this.isShowDialog = true
790
+      },
791
+      menuMsgTip: function () {
792
+        this.msgtip_visibility = false
793
+        this.isShowDialog = true
794
+      },
793 795
 
794 796
       menuComfirmThree: function (targetAdvices) {
795 797
 
@@ -992,10 +994,6 @@
992 994
                 }
993 995
               }
994 996
 
995
-              console.log(this.dialysisPrescription.dialysis_duration_hour)
996
-              console.log(this.dialysisPrescription.dialysis_duration_minute)
997
-              console.log(this.dialysisPrescription.dialysis_duration_hour == '')
998
-              console.log(this.dialysisPrescription.dialysis_duration_minute == 0)
999 997
 
1000 998
 
1001 999
 
@@ -1049,7 +1047,6 @@
1049 1047
         }
1050 1048
       },
1051 1049
       GetModeByModeId: function (val) {
1052
-        console.log("val",val)
1053 1050
         let treatment_mode_name = ''
1054 1051
         let treatment_mode = this.modeOption
1055 1052
 
@@ -1061,8 +1058,7 @@
1061 1058
         for (let keys in treatment_mode) {
1062 1059
           if (treatment_mode[keys].id == val) {
1063 1060
             treatment_mode_name = treatment_mode[keys].name
1064
-            console.log("treatment_mode_name",treatment_mode_name)
1065
-            if (treatment_mode_name == 'HD' || treatment_mode_name == 'HD+HP' || treatment_mode_name == 'HP' || treatment_mode_name == 'HF' || treatment_mode_name == 'SCUF' || treatment_mode_name == 'IUF' || treatment_mode_name == 'HFHD' || treatment_mode_name == 'HFHD +HP' || treatment_mode_name == 'PHF'|| treatment_mode_name == 'HFR' || treatment_mode_name == 'CRRT' || treatment_mode_name == '腹水回收' || treatment_mode_name == 'HD前置换' || treatment_mode_name == 'HD后置换') {
1061
+            if (treatment_mode_name == 'HD') {
1066 1062
               this.zhiShow = false
1067 1063
               this.totalShow = false
1068 1064
               this.huShow = false
@@ -1941,6 +1937,10 @@
1941 1937
 
1942 1938
       }
1943 1939
 
1940
+
1941
+
1942
+
1943
+
1944 1944
       if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
1945 1945
         this.timeValue = ''
1946 1946
         this.time = '03:00'
@@ -1989,6 +1989,19 @@
1989 1989
       this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration)
1990 1990
       this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration)
1991 1991
 
1992
+      if(this.dialysisPrescription.anticoagulant_shouji == ''){
1993
+        this.dialysisPrescription.anticoagulant_shouji = '0'
1994
+      }
1995
+
1996
+      if(this.dialysisPrescription.anticoagulant_weichi == ''){
1997
+        this.dialysisPrescription.anticoagulant_weichi = '0'
1998
+      }
1999
+
2000
+      if(this.dialysisPrescription.anticoagulant_zongliang == ''){
2001
+        this.dialysisPrescription.anticoagulant_weichi = '0'
2002
+      }
2003
+
2004
+
1992 2005
     },
1993 2006
 
1994 2007
     components: {
@@ -1999,40 +2012,37 @@
1999 2012
       CheckBoxSubMenu
2000 2013
     },
2001 2014
     watch: {
2002
-      'dialysisPrescription.anticoagulant_shouji': function (val) {
2003
-        if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_weichi == '') {
2004
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(0)
2005
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_weichi != '') {
2006
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
2007
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_shouji == '') {
2008
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(0)
2009
-        } else if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_shouji != '') {
2010
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(this.dialysisPrescription.anticoagulant_shouji)
2011
-        }
2015
+      "dialysisPrescription.dialysis_duration":function(){
2016
+        console.log(this.dialysisPrescription.dialysis_duration)
2017
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2018
+          this.dialysisPrescription.anticoagulant_shouji,
2019
+          this.dialysisPrescription.dialysis_duration,
2020
+          this.dialysisPrescription.anticoagulant_weichi
2021
+        );
2012 2022
         if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2013 2023
           this.dialysisPrescription.anticoagulant_zongliang = ''
2014 2024
         }
2015
-
2016
-
2017
-      }, 'dialysisPrescription.anticoagulant_weichi': function (val) {
2018
-        console.log(this.dialysisPrescription.anticoagulant_shouji)
2019
-        console.log(this.dialysisPrescription.anticoagulant_weichi)
2020
-        if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_weichi == '') {
2021
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(0)
2022
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_weichi != '') {
2023
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
2024
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_shouji == '') {
2025
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(0)
2026
-        } else if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_shouji != '') {
2027
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(this.dialysisPrescription.anticoagulant_shouji)
2025
+      },
2026
+      "dialysisPrescription.anticoagulant_shouji":function(){
2027
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2028
+          this.dialysisPrescription.anticoagulant_shouji,
2029
+          this.dialysisPrescription.dialysis_duration,
2030
+          this.dialysisPrescription.anticoagulant_weichi
2031
+        );
2032
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2033
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2028 2034
         }
2029
-
2035
+      },
2036
+      "dialysisPrescription.anticoagulant_weichi":function(){
2037
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2038
+          this.dialysisPrescription.anticoagulant_shouji,
2039
+          this.dialysisPrescription.dialysis_duration,
2040
+          this.dialysisPrescription.anticoagulant_weichi
2041
+        );
2030 2042
         if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2031 2043
           this.dialysisPrescription.anticoagulant_zongliang = ''
2032
-
2033 2044
         }
2034 2045
       },
2035
-
2036 2046
       isShowDialog (val) {
2037 2047
         if (val) {
2038 2048
           this.advice_visibility = false
@@ -2043,6 +2053,7 @@
2043 2053
 </script>
2044 2054
 
2045 2055
 
2056
+
2046 2057
 <style style="stylesheet/scss" lang="scss" scoped>
2047 2058
   .DialogContent {
2048 2059
   // padding-bottom:2rem !important;
@@ -2059,12 +2070,12 @@
2059 2070
   }
2060 2071
   }
2061 2072
   .newButton{
2062
-    
2073
+
2063 2074
     background: #258ffc;
2064 2075
     padding: 0 0.2rem;
2065 2076
     height: 0.85rem;
2066 2077
     line-height: 0.85rem;
2067
-    border-radius:5px; 
2078
+    border-radius:5px;
2068 2079
     color: #fff;
2069 2080
     margin-right: -3.5rem;
2070 2081
   }