Преглед на файлове

Merge branch 'new_pad_branch' of http://git.shengws.com/zhangbj/xt_pad into new_pad_branch

See999 преди 5 години
родител
ревизия
2a87869c4f
променени са 2 файла, в които са добавени 559 реда и са изтрити 600 реда
  1. 197 176
      src/pages/main/dialog/PrescriptionDialog.vue
  2. 362 424
      src/pages/main/today/dialysisPrescription.vue

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

@@ -4,15 +4,14 @@
4 4
     <div v-if="isShowDialog" class="Dialog">
5 5
       <div class="DialogTit">
6 6
         <span @click="close()" class="iconfont">&#xe6e9;</span>
7
-        <h1 class="name newName">透析处方</h1>
8
-        <button class="newButton" @click="showmsgtip">{{patient.name}}</button>
9
-        <span @click="commitInfo" class="success" v-if="isPermission()">保存</span>
7
+        <h1 class="name">透析处方</h1>
8
+        <button @click="showmsgtip">{{patient.name}} [透析号 {{patient.dialysis_no}} ]</button>
9
+        <span @click="commitInfo" class="success" v-if="isPermission()">完成</span>
10 10
         <span @click="commitInfo" class="success" v-if="!isPermission()"></span>
11 11
 
12 12
       </div>
13 13
 
14
-      <div class="DialogContent newDialogContent" id="dialogTop">
15
-        <div>
14
+      <div class="DialogContent" id="dialogTop">
16 15
         <div @click="showSubMenu('mode')" class="item" ref="mode" v-if="isShow('透析模式')">
17 16
           <label class="name" for="txms">透析模式</label>
18 17
           <div class="content">
@@ -36,8 +35,8 @@
36 35
         </div>
37 36
 
38 37
         <div class="item" v-if="isShow('目标超滤量')">
39
-          <label class="name" for="mbcll" v-if="this.$store.getters.user.template_info.template_id == 6">目标超滤量(ml)</label>
40
-          <label class="name" for="mbcll" v-if="this.$store.getters.user.template_info.template_id != 6">目标超滤量(L)</label>
38
+          <!--<label class="name" for="mbcll" v-if="this.$store.getters.user.template_info.template_id == 6">目标超滤量(ml)</label>-->
39
+          <label class="name" for="mbcll">目标超滤量(L)</label>
41 40
           <div class="content">
42 41
             <input type="tel" @focus="inputFocus" id="mbcll" v-model="dialysisPrescription.target_ultrafiltration"/>
43 42
           </div>
@@ -61,7 +60,12 @@
61 60
         </div>
62 61
 
63 62
         <div class="item" v-if="anticoagulant.shouji != -1&&isShow('首剂')">
64
-          <label class="name" for="sj">首剂({{anticoagulant.shouji_unit}})</label>
63
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2">首剂(mg)</label>
64
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">首剂(mg)</label>
65
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">首剂(iu)</label>
66
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">首剂(mg)</label>
67
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">首剂(mg)</label>
68
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">首剂(mg)</label>
65 69
           <div class="content">
66 70
             <input v-if="dialysisPrescription.anticoagulant != 1" type="tel" @focus="inputFocus" id="sj" v-model="dialysisPrescription.anticoagulant_shouji"
67 71
                    :disabled="anticoagulant.shouji==1?false:true"/>
@@ -71,7 +75,12 @@
71 75
           </div>
72 76
         </div>
73 77
         <div class="item" v-if="anticoagulant.weichi != -1&&isShow('维持')">
74
-          <label class="name" for="wz">维持({{anticoagulant.weichi_unit}})</label>
78
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2">维持(mg/h)</label>
79
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">维持(mg/h)</label>
80
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">维持(iu)</label>
81
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">维持(mg/h)</label>
82
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">维持(ml/h)</label>
83
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">维持(mg/h)</label>
75 84
           <div class="content">
76 85
             <input v-if="dialysisPrescription.anticoagulant != 1" type="tel" @focus="inputFocus" id="wz" class="inputBox"
77 86
                    v-model="dialysisPrescription.anticoagulant_weichi"
@@ -82,8 +91,9 @@
82 91
           </div>
83 92
         </div>
84 93
         <div class="item" v-if="anticoagulant.zongliang != -1 && isShow('总量')">
94
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2">总量(mg)</label>
85 95
           <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">总量(mg)</label>
86
-          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">总量(IU)</label>
96
+          <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">总量(iu)</label>
87 97
           <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">总量(mg)</label>
88 98
           <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">总量(mg)</label>
89 99
           <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">总量(mg)</label>
@@ -122,7 +132,7 @@
122 132
         </div> -->
123 133
 
124 134
         <div class="line"></div>
125
-        <div class="item" v-if="isShow('置换量')">
135
+        <div class="item" v-if="isShow('置换量')" v-show="zhiShow">
126 136
           <label class="name" for="zhy">置换量(L)</label>
127 137
           <div class="content">
128 138
             <input type="tel" @focus="inputFocus" id="zhy" v-model="dialysisPrescription.replacement_total"/>
@@ -233,7 +243,7 @@
233 243
           </div>
234 244
         </div>
235 245
 
236
-        <div @click="showSubMenu('displace_liqui_part')" class="item" ref="displace_liqui_part" v-if="isShow('置换液')">
246
+        <div @click="showSubMenu('displace_liqui_part')" class="item" ref="displace_liqui_part" v-if="isShow('置换液')" v-show="huShow">
237 247
           <label class="name" for="knj" v-if="this.$store.getters.user.template_info.template_id == 6">置换方式</label>
238 248
           <label class="name" for="knj" v-if="this.$store.getters.user.template_info.template_id != 6">置换液</label>
239 249
           <div class="content">
@@ -242,7 +252,7 @@
242 252
           </div>
243 253
         </div>
244 254
 
245
-        <div class="item" v-if="isShow('置换液总量')">
255
+        <div class="item" v-if="isShow('置换液总量')" v-show="totalShow">
246 256
           <label class="name" for="knj">置换液总量(L)</label>
247 257
           <div class="content">
248 258
             <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.displace_liqui_value"/>
@@ -299,7 +309,7 @@
299 309
           <textarea class="textarea" id="bz" placeholder="请输入内容" v-model="dialysisPrescription.remark"
300 310
                     @focus="lastInputFocus" @blur="lastInputBlur"></textarea>
301 311
         </div>
302
-        </div>
312
+
303 313
         <!--<div class="footer">-->
304 314
         <!--处方医生:刘小军 医生-->
305 315
         <!--</div>-->
@@ -331,7 +341,7 @@
331 341
     <long-advice-sub-menu :visibility="advice_visibility" v-on:menu-cancle-three="menuCancleThree"
332 342
                           v-on:menu-comfirm-three="menuComfirmThree" :propsForm="advicePropForm"></long-advice-sub-menu>
333 343
 
334
-    <msg-tip  :visibility="msgtip_visibility" :predialysis="predialysis"
344
+    <msg-tip style="width:500px;" :visibility="msgtip_visibility" :predialysis="predialysis"
335 345
              :last_predialysis="last_predialysis"
336 346
              :record="record"
337 347
              :last_record="last_record"
@@ -347,6 +357,7 @@
347 357
   import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
348 358
   import MultipleSubMenu from './subMenu/multipleSubMenu'
349 359
   import {commitDialysisPrescription, CreateGroupAdvice, GetSolution, postSign, postSolution} from '@/api/dialysis'
360
+  import { calculateAnticoagulantZL} from '@/utils/tools'
350 361
 
351 362
   import {Toast} from 'vant'
352 363
   import {getDataConfig} from '@/utils/data'
@@ -442,6 +453,7 @@
442 453
         msgtip_visibility: false,
443 454
         time: '03:00',
444 455
         timeValue: '',
456
+        tempTimeValue:'',
445 457
         isShowSign: false,
446 458
         anticoagulantsConfit: {},
447 459
         dialysateFormulationOptions: [],
@@ -454,8 +466,8 @@
454 466
           result: [],
455 467
           operators: [],
456 468
 
457
-      },
458
-      is_show: false,
469
+        },
470
+        is_show: false,
459 471
 
460 472
         perfusion_apparatus: {},
461 473
         replacementWays: [],
@@ -607,7 +619,7 @@
607 619
         }
608 620
         this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
609 621
 
610
-        this.dialysisPrescription.dialysis_duration = this.dialysisPrescription.dialysis_duration_hour + '.' + (this.dialysisPrescription.dialysis_duration_minute)
622
+        this.dialysisPrescription.dialysis_duration = parseFloat(this.dialysisPrescription.dialysis_duration_hour) + parseFloat((this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2))
611 623
 
612 624
       },
613 625
       inputFocus: function (event) {
@@ -677,139 +689,139 @@
677 689
             this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus
678 690
             this.propForm.click_ref = 'perfusion_apparatus'
679 691
 
680
-          break
681
-        case 'replacement_way':
682
-          this.propForm.type = 4
683
-          this.isShowDialog = false
684
-          this.propForm.title = '置换方式'
685
-          this.visibility = true
686
-          this.propForm.list = []
687
-          this.propForm.optionList = this.replacementWays
688
-          this.propForm.isMultiple = 1
689
-          this.propForm.selectId = this.dialysisPrescription.replacement_way
690
-          this.propForm.click_ref = 'replacement_way'
692
+            break
693
+          case 'replacement_way':
694
+            this.propForm.type = 4
695
+            this.isShowDialog = false
696
+            this.propForm.title = '置换方式'
697
+            this.visibility = true
698
+            this.propForm.list = []
699
+            this.propForm.optionList = this.replacementWays
700
+            this.propForm.isMultiple = 1
701
+            this.propForm.selectId = this.dialysisPrescription.replacement_way
702
+            this.propForm.click_ref = 'replacement_way'
703
+
704
+            break
691 705
 
706
+          case 'anticoagulant':
707
+            this.propForm.type = 5
708
+            this.isShowDialog = false
709
+            this.propForm.title = '抗疑剂'
710
+            this.visibility = true
711
+            this.propForm.list = []
712
+            this.propForm.optionList = this.anticoagulantsConfit
713
+            this.propForm.isMultiple = 1
714
+            this.propForm.selectId = this.dialysisPrescription.anticoagulant
715
+            this.propForm.click_ref = 'anticoagulant'
716
+            break
717
+          case 'dialysate_formulation':
718
+            this.propForm.type = 6
719
+            this.isShowDialog = false
720
+            this.propForm.title = '透析液配方'
721
+            this.visibility = true
722
+            this.propForm.list = []
723
+            this.propForm.optionList = this.dialysateFormulationOptions
724
+            this.propForm.isMultiple = 1
725
+            this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
726
+            this.propForm.click_ref = 'dialysate_formulation'
727
+            break
728
+          case 'body_fluid':
729
+            this.propForm.type = 7
730
+            this.isShowDialog = false
731
+            this.propForm.title = '体液过多症状'
732
+            this.visibility = true
733
+            this.propForm.list = []
734
+            this.propForm.optionList = this.bodyFluidOptions
735
+            this.propForm.isMultiple = 1
736
+            this.propForm.selectId = this.dialysisPrescription.body_fluid
737
+            this.propForm.click_ref = 'body_fluid'
738
+            break
739
+          case 'special_medicine':
740
+            this.propForm.type = 8
741
+            this.isShowDialog = false
742
+            this.propForm.title = '透析前使用特殊药物'
743
+            this.visibility = true
744
+            this.propForm.list = []
745
+            this.propForm.optionList = this.specialMedicineOptions
746
+            this.propForm.isMultiple = 1
747
+            this.propForm.selectId = this.dialysisPrescription.special_medicine
748
+            this.propForm.click_ref = 'special_medicine'
692 749
             break
750
+          case 'displace_liqui_part':
751
+            this.propForm.type = 9
752
+            this.isShowDialog = false
753
+            this.propForm.title = '置换液'
754
+            this.visibility = true
755
+            this.propForm.list = []
756
+            this.propForm.optionList = this.displaceLiquiPartOptions
757
+            this.propForm.isMultiple = 1
758
+            this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
759
+            this.propForm.click_ref = 'displace_liqui_part'
760
+            break
761
+          case 'blood_access':
762
+            this.propForm.type = 10
763
+            this.isShowDialog = false
764
+            this.propForm.title = '血管通路'
765
+            this.visibility = true
766
+            this.propForm.list = []
767
+            this.propForm.optionList = this.bloodAccessOptions
768
+            this.propForm.isMultiple = 1
769
+            this.propForm.selectId = this.dialysisPrescription.blood_access
770
+            this.propForm.click_ref = 'blood_access'
771
+            break
772
+          case 'dialyzer_perfusion_apparatus':
773
+            // this.propForm.type = 11
774
+            // this.isShowDialog = false
775
+            // this.propForm.title = '透析器/灌流器'
776
+            // this.visibility = true
777
+            // this.propForm.list = []
778
+            // this.propForm.optionList = this.bloodAccessOptions
779
+            // this.propForm.isMultiple = 1
780
+            // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
781
+            // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
782
+            // break
693 783
 
694
-        case 'anticoagulant':
695
-          this.propForm.type = 5
696
-          this.isShowDialog = false
697
-          this.propForm.title = '抗疑剂'
698
-          this.visibility = true
699
-          this.propForm.list = []
700
-          this.propForm.optionList = this.anticoagulantsConfit
701
-          this.propForm.isMultiple = 1
702
-          this.propForm.selectId = this.dialysisPrescription.anticoagulant
703
-          this.propForm.click_ref = 'anticoagulant'
704
-          break
705
-        case 'dialysate_formulation':
706
-          this.propForm.type = 6
707
-          this.isShowDialog = false
708
-          this.propForm.title = '透析液配方'
709
-          this.visibility = true
710
-          this.propForm.list = []
711
-          this.propForm.optionList = this.dialysateFormulationOptions
712
-          this.propForm.isMultiple = 1
713
-          this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
714
-          this.propForm.click_ref = 'dialysate_formulation'
715
-          break
716
-        case 'body_fluid':
717
-          this.propForm.type = 7
718
-          this.isShowDialog = false
719
-          this.propForm.title = '体液过多症状'
720
-          this.visibility = true
721
-          this.propForm.list = []
722
-          this.propForm.optionList = this.bodyFluidOptions
723
-          this.propForm.isMultiple = 1
724
-          this.propForm.selectId = this.dialysisPrescription.body_fluid
725
-          this.propForm.click_ref = 'body_fluid'
726
-          break
727
-        case 'special_medicine':
728
-          this.propForm.type = 8
729
-          this.isShowDialog = false
730
-          this.propForm.title = '透析前使用特殊药物'
731
-          this.visibility = true
732
-          this.propForm.list = []
733
-          this.propForm.optionList = this.specialMedicineOptions
734
-          this.propForm.isMultiple = 1
735
-          this.propForm.selectId = this.dialysisPrescription.special_medicine
736
-          this.propForm.click_ref = 'special_medicine'
737
-          break
738
-        case 'displace_liqui_part':
739
-          this.propForm.type = 9
740
-          this.isShowDialog = false
741
-          this.propForm.title = '置换液'
742
-          this.visibility = true
743
-          this.propForm.list = []
744
-          this.propForm.optionList = this.displaceLiquiPartOptions
745
-          this.propForm.isMultiple = 1
746
-          this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
747
-          this.propForm.click_ref = 'displace_liqui_part'
748
-          break
749
-        case 'blood_access':
750
-          this.propForm.type = 10
751
-          this.isShowDialog = false
752
-          this.propForm.title = '血管通路'
753
-          this.visibility = true
754
-          this.propForm.list = []
755
-          this.propForm.optionList = this.bloodAccessOptions
756
-          this.propForm.isMultiple = 1
757
-          this.propForm.selectId = this.dialysisPrescription.blood_access
758
-          this.propForm.click_ref = 'blood_access'
759
-          break
760
-        case 'dialyzer_perfusion_apparatus':
761
-          // this.propForm.type = 11
762
-          // this.isShowDialog = false
763
-          // this.propForm.title = '透析器/灌流器'
764
-          // this.visibility = true
765
-          // this.propForm.list = []
766
-          // this.propForm.optionList = this.bloodAccessOptions
767
-          // this.propForm.isMultiple = 1
768
-          // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
769
-          // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
770
-          // break
771
-
772
-          this.propForm.result = []
773
-          this.isHasOther = 2
774
-          this.propForm.type = 11
775
-          this.isShowDialog = false
776
-          this.propForm.title = '透析器/灌流器'
777
-          this.visibility = true
778
-          this.propForm.list = []
779
-          this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
780
-          this.propForm.optionList = []
781
-          this.propForm.isMultiple = 2
782
-          // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
783
-          if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
784
-            if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
785
-              this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
784
+            this.propForm.result = []
785
+            this.isHasOther = 2
786
+            this.propForm.type = 11
787
+            this.isShowDialog = false
788
+            this.propForm.title = '透析器/灌流器'
789
+            this.visibility = true
790
+            this.propForm.list = []
791
+            this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
792
+            this.propForm.optionList = []
793
+            this.propForm.isMultiple = 2
794
+            // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
795
+            if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
796
+              if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
797
+                this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
798
+              } else {
799
+                this.propForm.result = []
800
+              }
786 801
             } else {
787 802
               this.propForm.result = []
788 803
             }
789
-          } else {
790
-            this.propForm.result = []
791
-          }
792
-          this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
793
-          break
794
-      }
795
-    },
796
-    menuCancle: function () {
797
-      this.visibility = false
798
-      this.isShowDialog = true
799
-      this.$nextTick(() => {
800
-        if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
801
-          this.$refs[this.propForm.click_ref].scrollIntoView()
804
+            this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
805
+            break
802 806
         }
803
-      })
804
-    },
805
-    menuCancleThree: function () {
806
-      this.advice_visibility = false
807
-      this.isShowDialog = true
808
-    },
809
-    menuMsgTip: function () {
810
-      this.msgtip_visibility = false
811
-      this.isShowDialog = true
812
-    },
807
+      },
808
+      menuCancle: function () {
809
+        this.visibility = false
810
+        this.isShowDialog = true
811
+        this.$nextTick(() => {
812
+          if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
813
+            this.$refs[this.propForm.click_ref].scrollIntoView()
814
+          }
815
+        })
816
+      },
817
+      menuCancleThree: function () {
818
+        this.advice_visibility = false
819
+        this.isShowDialog = true
820
+      },
821
+      menuMsgTip: function () {
822
+        this.msgtip_visibility = false
823
+        this.isShowDialog = true
824
+      },
813 825
 
814 826
       menuComfirmThree: function (targetAdvices) {
815 827
 
@@ -1012,10 +1024,6 @@
1012 1024
                 }
1013 1025
               }
1014 1026
 
1015
-              console.log(this.dialysisPrescription.dialysis_duration_hour)
1016
-              console.log(this.dialysisPrescription.dialysis_duration_minute)
1017
-              console.log(this.dialysisPrescription.dialysis_duration_hour == '')
1018
-              console.log(this.dialysisPrescription.dialysis_duration_minute == 0)
1019 1027
 
1020 1028
 
1021 1029
 
@@ -1959,6 +1967,10 @@
1959 1967
 
1960 1968
       }
1961 1969
 
1970
+
1971
+
1972
+
1973
+
1962 1974
       if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
1963 1975
         this.timeValue = ''
1964 1976
         this.time = '03:00'
@@ -2007,6 +2019,19 @@
2007 2019
       this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration)
2008 2020
       this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration)
2009 2021
 
2022
+      if(this.dialysisPrescription.anticoagulant_shouji == ''){
2023
+        this.dialysisPrescription.anticoagulant_shouji = '0'
2024
+      }
2025
+
2026
+      if(this.dialysisPrescription.anticoagulant_weichi == ''){
2027
+        this.dialysisPrescription.anticoagulant_weichi = '0'
2028
+      }
2029
+
2030
+      if(this.dialysisPrescription.anticoagulant_zongliang == ''){
2031
+        this.dialysisPrescription.anticoagulant_weichi = '0'
2032
+      }
2033
+
2034
+
2010 2035
     },
2011 2036
 
2012 2037
     components: {
@@ -2017,40 +2042,37 @@
2017 2042
       CheckBoxSubMenu
2018 2043
     },
2019 2044
     watch: {
2020
-      'dialysisPrescription.anticoagulant_shouji': function (val) {
2021
-        if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_weichi == '') {
2022
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(0)
2023
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_weichi != '') {
2024
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
2025
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_shouji == '') {
2026
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(0)
2027
-        } else if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_shouji != '') {
2028
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(this.dialysisPrescription.anticoagulant_shouji)
2029
-        }
2045
+      "dialysisPrescription.dialysis_duration":function(){
2046
+        console.log(this.dialysisPrescription.dialysis_duration)
2047
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2048
+          this.dialysisPrescription.anticoagulant_shouji,
2049
+          this.dialysisPrescription.dialysis_duration,
2050
+          this.dialysisPrescription.anticoagulant_weichi
2051
+        );
2030 2052
         if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2031 2053
           this.dialysisPrescription.anticoagulant_zongliang = ''
2032 2054
         }
2033
-
2034
-
2035
-      }, 'dialysisPrescription.anticoagulant_weichi': function (val) {
2036
-        console.log(this.dialysisPrescription.anticoagulant_shouji)
2037
-        console.log(this.dialysisPrescription.anticoagulant_weichi)
2038
-        if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_weichi == '') {
2039
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(0)
2040
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_weichi != '') {
2041
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
2042
-        } else if (this.dialysisPrescription.anticoagulant_shouji != '' && this.dialysisPrescription.anticoagulant_shouji == '') {
2043
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(0)
2044
-        } else if (this.dialysisPrescription.anticoagulant_shouji == '' && this.dialysisPrescription.anticoagulant_shouji != '') {
2045
-          this.dialysisPrescription.anticoagulant_zongliang = parseInt(0) + parseInt(this.dialysisPrescription.anticoagulant_shouji)
2055
+      },
2056
+      "dialysisPrescription.anticoagulant_shouji":function(){
2057
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2058
+          this.dialysisPrescription.anticoagulant_shouji,
2059
+          this.dialysisPrescription.dialysis_duration,
2060
+          this.dialysisPrescription.anticoagulant_weichi
2061
+        );
2062
+        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2063
+          this.dialysisPrescription.anticoagulant_zongliang = ''
2046 2064
         }
2047
-
2065
+      },
2066
+      "dialysisPrescription.anticoagulant_weichi":function(){
2067
+        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2068
+          this.dialysisPrescription.anticoagulant_shouji,
2069
+          this.dialysisPrescription.dialysis_duration,
2070
+          this.dialysisPrescription.anticoagulant_weichi
2071
+        );
2048 2072
         if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2049 2073
           this.dialysisPrescription.anticoagulant_zongliang = ''
2050
-
2051 2074
         }
2052 2075
       },
2053
-
2054 2076
       isShowDialog (val) {
2055 2077
         if (val) {
2056 2078
           this.advice_visibility = false
@@ -2059,7 +2081,6 @@
2059 2081
     }
2060 2082
   }
2061 2083
 </script>
2062
-
2063 2084
 <style style="stylesheet/scss" lang="scss" scoped>
2064 2085
   .DialogContent {
2065 2086
   // padding-bottom:2rem !important;
@@ -2080,7 +2101,7 @@
2080 2101
     padding: 0 0.2rem;
2081 2102
     height: 0.85rem;
2082 2103
     line-height: 0.85rem;
2083
-    border-radius:5px; 
2104
+    border-radius:5px;
2084 2105
     color: #fff;
2085 2106
     margin-right: -3.5rem;
2086 2107
   }

+ 362 - 424
src/pages/main/today/dialysisPrescription.vue Целия файл

@@ -2,90 +2,67 @@
2 2
   <div class="plate-box">
3 3
     <h2 class="title">
4 4
       <span class="line"></span>
5
-      <p>{{ title }}</p>
5
+      <p>{{title}}</p>
6 6
       <span class="line"></span>
7 7
     </h2>
8 8
     <div class="plate">
9 9
       <ul>
10 10
         <li v-if="isShow('透析模式')">
11
-          <label>透析模式 : </label>
12
-          <span class="content">{{ dialysis_mode }}</span>
11
+          <label>透析模式 :</label>
12
+          <span class="content">{{dialysis_mode}}</span>
13 13
         </li>
14 14
         <li v-if="isShow('目标超滤量')">
15
-          <label>目标超滤量 : </label>
16
-          <span class="content">{{
17
-            target_ultrafiltration != "0" ? target_ultrafiltration : ""
18
-          }}</span>
15
+          <label>目标超滤量 :</label>
16
+          <span class="content">{{target_ultrafiltration != '0'?target_ultrafiltration:''}}</span>
19 17
           <span
20 18
             class="unit"
21
-            v-if="this.$store.getters.user.template_info.template_id != 6"
22
-            >{{ target_ultrafiltration != "0" ? "L" : "" }}</span
23
-          >
24
-          <span
25
-            class="unit"
26
-            v-if="this.$store.getters.user.template_info.template_id == 6"
27
-            >{{ target_ultrafiltration != "0" ? "ml" : "" }}</span
28
-          >
19
+          >{{target_ultrafiltration != '0'?"L":''}}</span>
20
+          <!--<span-->
21
+          <!--class="unit"-->
22
+          <!--v-if="this.$store.getters.user.template_info.template_id == 6"-->
23
+          <!--&gt;{{target_ultrafiltration != '0'?"ml":''}}</span>-->
29 24
         </li>
30 25
         <li v-if="isShow('首剂')">
31
-          <label>首剂 : </label>
32
-          <span class="content">{{
33
-            anticoagulant_shouji != "0" ? anticoagulant_shouji : ""
34
-          }}</span>
35
-          <span class="unit">{{
36
-            anticoagulant_shouji != "0" ? "mg" : ""
37
-          }}</span>
26
+          <label>首剂 :</label>
27
+          <span class="content">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>
28
+          <span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>
38 29
         </li>
39 30
         <li v-if="isShow('钙')">
40
-          <label>钙: </label>
41
-          <span class="content">{{ calcium != "0" ? calcium : "" }}</span>
42
-          <span class="unit">{{ calcium != "0" ? "mmol/L" : "" }}</span>
31
+          <label>钙:</label>
32
+          <span class="content">{{calcium != '0'?calcium:""}}</span>
33
+          <span class="unit">{{calcium != '0'?"mmol/L":""}}</span>
43 34
         </li>
44 35
         <li v-if="isShow('置换量')">
45
-          <label>置换量 : </label>
46
-          <span class="content">{{
47
-            replacement_total != "0" ? replacement_total : ""
48
-          }}</span>
49
-          <span class="unit">{{ replacement_total != "0" ? "L" : "" }}</span>
36
+          <label>置换量 :</label>
37
+          <span class="content">{{replacement_total != '0'?replacement_total:""}}</span>
38
+          <span class="unit">{{replacement_total != '0'?"L":""}}</span>
50 39
         </li>
51 40
 
52 41
         <li v-if="isShow('葡萄糖')">
53
-          <label>葡萄糖 : </label>
54
-          <span class="content">{{ glucose != "0" ? glucose : "" }}</span>
55
-          <span class="unit">{{ glucose != "0" ? "mmol/L" : "" }}</span>
42
+          <label>葡萄糖 :</label>
43
+          <span class="content">{{glucose != '0'?glucose:""}}</span>
44
+          <span class="unit">{{glucose != '0'?"mmol/L":""}}</span>
56 45
         </li>
57 46
         <!-- </ul>
58
-      <ul> -->
47
+        <ul>-->
59 48
         <li v-if="isShow('透析时长')">
60 49
           <label>透析时长 : </label>
61
-          <span class="content">{{
62
-            dialysis_duration != "0" ? dialysis_duration : ""
63
-          }}</span>
50
+          <span class="content">{{dialysis_duration != '0'?dialysis_duration:""}}</span>
64 51
         </li>
65 52
         <li v-if="isShow('透析液配方')">
66 53
           <label>透析液配方 : </label>
67
-          <span class="content">{{ dialysate_formulation }}</span>
68
-        </li>
69
-        <li v-if="isShow('维持')">
70
-          <label>维持 : </label>
71
-          <span class="content">{{
72
-            anticoagulant_weichi != "0" ? anticoagulant_weichi : ""
73
-          }}</span>
74
-          <span class="unit">{{
75
-            anticoagulant_weichi != "0" ? "mg/h" : ""
76
-          }}</span>
54
+          <span class="content">{{dialysate_formulation}}</span>
77 55
         </li>
56
+
78 57
         <li v-if="isShow('钾')">
79 58
           <label>钾 : </label>
80
-          <span class="content">{{ kalium != "0" ? kalium : "" }}</span>
81
-          <span class="unit">{{ kalium != "0" ? "mmol/L" : "" }}</span>
59
+          <span class="content">{{kalium != '0'?kalium:""}}</span>
60
+          <span class="unit">{{kalium != '0'?"mmol/L":""}}</span>
82 61
         </li>
83 62
         <li v-if="isShow('碳酸氢盐')">
84 63
           <label>碳酸氢盐 : </label>
85
-          <span class="content">{{
86
-            bicarbonate != "0" ? bicarbonate : ""
87
-          }}</span>
88
-          <span class="unit">{{ bicarbonate != "0" ? "mmol/L" : "" }}</span>
64
+          <span class="content">{{bicarbonate != '0'?bicarbonate:""}}</span>
65
+          <span class="unit">{{bicarbonate != '0'?"mmol/L":""}}</span>
89 66
         </li>
90 67
         <!-- <li>
91 68
           <label>干体重 : </label>
@@ -94,454 +71,415 @@
94 71
         </li> -->
95 72
         <li v-if="isShow('透析液温度')">
96 73
           <label>透析液温度 : </label>
97
-          <span class="content">{{
98
-            dialysate_temperature != "0" ? dialysate_temperature : ""
99
-          }}</span>
100
-          <span class="unit">{{
101
-            dialysate_temperature != "0" ? "℃" : ""
102
-          }}</span>
74
+          <span class="content">{{dialysate_temperature != '0'?dialysate_temperature:""}}</span>
75
+          <span class="unit">{{dialysate_temperature != '0'?"℃":""}}</span>
103 76
         </li>
104 77
         <!-- </ul>
105
-      <ul> -->
78
+        <ul> -->
106 79
         <li v-if="isShow('血流量')">
107 80
           <label>血流量 : </label>
108
-          <span class="content">{{
109
-            blood_flow_volume != "0" ? blood_flow_volume : ""
110
-          }}</span>
111
-          <span class="unit">{{
112
-            blood_flow_volume != "0" ? "ml/min" : ""
113
-          }}</span>
81
+          <span class="content">{{blood_flow_volume != '0'?blood_flow_volume:''}}</span>
82
+          <span class="unit">{{blood_flow_volume != '0'?"ml/min":''}}</span>
114 83
         </li>
115 84
         <li v-if="isShow('抗凝剂')">
116 85
           <label>抗凝剂 : </label>
117
-          <span class="content">{{ anticoagulant }}</span>
86
+          <span class="content">{{anticoagulant}}</span>
118 87
         </li>
119
-        <li v-if="isShow('总量')">
88
+        <li v-if="isShow('首剂')&&this.prescription.anticoagulant != 5">
89
+          <label>首剂 : </label>
90
+          <span class="content">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>
91
+          <!--<span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>-->
92
+          <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_shouji != '0'?"mg":""}}</span>
93
+          <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_shouji != '0'?"iu":""}}</span>
94
+          <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_shouji != '0'?"mg":""}}</span>
95
+          <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_shouji != '0'?"mg":""}}</span>
96
+          <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_shouji != '0'?"mg":""}}</span>
97
+
98
+        </li>
99
+        <li v-if="isShow('维持')&&this.prescription.anticoagulant != 5">
100
+          <label>维持 : </label>
101
+          <span class="content">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
102
+          <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
103
+          <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_weichi != '0'?"iu":""}}</span>
104
+          <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
105
+          <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
106
+          <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
107
+        </li>
108
+
109
+        <li v-if="isShow('总量')&&this.prescription.anticoagulant != 5">
120 110
           <label>总量: </label>
121
-          <span class="content">{{
122
-            anticoagulant_zongliang != "0" ? anticoagulant_zongliang : ""
123
-          }}</span>
124
-          <span class="unit" v-if="this.prescription.anticoagulant == 2">{{
125
-            anticoagulant_zongliang != "0" ? "mg" : ""
126
-          }}</span>
127
-          <span class="unit" v-if="this.prescription.anticoagulant == 3">{{
128
-            anticoagulant_zongliang != "0" ? "IU" : ""
129
-          }}</span>
130
-          <span class="unit" v-if="this.prescription.anticoagulant == 1">{{
131
-            anticoagulant_zongliang != "0" ? "mg" : ""
132
-          }}</span>
133
-          <span class="unit" v-if="this.prescription.anticoagulant == 4">{{
134
-            anticoagulant_zongliang != "0" ? "mg" : ""
135
-          }}</span>
136
-          <span class="unit" v-if="this.prescription.anticoagulant == 5">{{
137
-            anticoagulant_zongliang != "0" ? "mg" : ""
138
-          }}</span>
111
+          <span class="content">{{anticoagulant_zongliang != '0'?anticoagulant_zongliang:""}}</span>
112
+          <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
113
+          <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_zongliang != '0'?"iu":""}}</span>
114
+          <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
115
+          <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
116
+          <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
139 117
         </li>
118
+
119
+
120
+        <li v-if="isShow('钙名称')&&this.prescription.anticoagulant == 5">
121
+          <label>钙名称: </label>
122
+          <span class="content">{{this.prescription.anticoagulant_gaimingcheng}}</span>
123
+        </li>
124
+
125
+
126
+        <li v-if="isShow('钙剂量')&&this.prescription.anticoagulant == 5">
127
+          <label>钙剂量: </label>
128
+          <span class="content">{{this.prescription.anticoagulant_gaijiliang}}</span>
129
+          <span class="unit" v-if="this.prescription.anticoagulant == 5">{{'ml/h'}}</span>
130
+        </li>
131
+
132
+
140 133
         <li v-if="isShow('钠')">
141 134
           <label>钠 : </label>
142
-          <span class="content">{{ sodium != "0" ? sodium : "" }}</span>
143
-          <span class="unit">{{ sodium != "0" ? "mmol/L" : "" }}</span>
135
+          <span class="content">{{sodium != '0'?sodium:""}}</span>
136
+          <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
144 137
         </li>
145 138
         <li v-if="isShow('透析液流量')">
146 139
           <label>透析液流量 : </label>
147
-          <span class="content">{{
148
-            dialysate_flow != "0" ? dialysate_flow : ""
149
-          }}</span>
150
-          <span class="unit">{{ dialysate_flow != "0" ? "ml/min" : "" }}</span>
140
+          <span class="content">{{dialysate_flow != '0'?dialysate_flow:""}}</span>
141
+          <span class="unit">{{dialysate_flow != '0'?"ml/min":""}}</span>
151 142
         </li>
152 143
 
153 144
         <!-- </ul>
154
-      <ul> -->
145
+        <ul> -->
155 146
         <li v-if="isShow('透析器/灌流器')">
156 147
           <label>透析器/灌流器 : </label>
157
-          <span class="content">{{ dialyzer_perfusion_apparatus }}</span>
148
+          <span class="content">{{dialyzer_perfusion_apparatus}}</span>
158 149
           <span class="unit"></span>
159 150
         </li>
160 151
         <li v-if="isShow('体液过多症状')">
161 152
           <label>体液过多症状: </label>
162
-          <span class="content">{{ body_fluid }}</span>
153
+          <span class="content">{{body_fluid}}</span>
163 154
           <span class="unit"></span>
164 155
         </li>
165 156
         <li v-if="isShow('透析前使用特殊药物')">
166 157
           <label>透析前使用特殊药物: </label>
167
-          <span class="content">{{ special_medicine }}</span>
158
+          <span class="content">{{special_medicine}}</span>
168 159
           <span class="unit"></span>
169 160
         </li>
170 161
         <li v-if="isShow('透析前使用其他特殊药物')">
171 162
           <label>透析前使用其他特殊药物: </label>
172
-          <span class="content">{{ special_medicine_other }}</span>
163
+          <span class="content">{{special_medicine_other}}</span>
173 164
           <span class="unit"></span>
174 165
         </li>
175 166
         <li v-if="isShow('置换液')">
176
-          <label v-if="this.$store.getters.user.template_info.template_id != 6"
177
-            >置换液:
178
-          </label>
179
-          <label v-if="this.$store.getters.user.template_info.template_id == 6"
180
-            >置换方式:
181
-          </label>
182
-          <span class="content">{{ displace_liqui }}</span>
167
+          <label v-if="this.$store.getters.user.template_info.template_id != 6">置换液: </label>
168
+          <label v-if="this.$store.getters.user.template_info.template_id == 6">置换方式: </label>
169
+          <span class="content">{{displace_liqui}}</span>
183 170
           <span class="unit"></span>
184 171
         </li>
185 172
         <li v-if="isShow('血管通路')">
186 173
           <label>血管通路: </label>
187
-          <span class="content">{{ blood_access }}</span>
174
+          <span class="content">{{blood_access}}</span>
188 175
           <span class="unit"></span>
189 176
         </li>
190 177
         <li v-if="isShow('实际超滤量')">
191 178
           <label>实际超滤量: </label>
192
-          <span class="content">{{
193
-            ultrafiltration != "0" ? ultrafiltration : ""
194
-          }}</span>
195
-          <span class="unit">{{ ultrafiltration != "0" ? "L" : "" }}</span>
179
+          <span class="content">{{ultrafiltration != '0'? ultrafiltration:''}}</span>
180
+          <span class="unit">{{ultrafiltration != '0'?"L":""}}</span>
181
+
196 182
         </li>
197 183
         <li v-if="isShow('目标KT/V')">
198 184
           <label>目标KT/V: </label>
199
-          <span class="content">{{ target_ktv != "0" ? target_ktv : "" }}</span>
185
+          <span class="content">{{target_ktv != '0'? target_ktv:''}}</span>
200 186
         </li>
201 187
 
202 188
         <li v-if="isShow('电导度')">
203 189
           <label>电导度 : </label>
204
-          <span class="content">{{
205
-            conductivity != "0" ? conductivity : ""
206
-          }}</span>
207
-          <span class="unit">{{ conductivity != "0" ? "mS/m" : "" }}</span>
190
+          <span class="content">{{conductivity != '0'?conductivity:""}}</span>
191
+          <span class="unit">{{conductivity != '0'?"mS/m":""}}</span>
208 192
         </li>
193
+
209 194
       </ul>
210 195
     </div>
211
-    <div class="note">
212
-      备注 : <span>{{ note }}</span>
213
-    </div>
196
+    <div class="note">备注 : <span>{{note}}</span></div>
214 197
   </div>
215 198
 </template>
216 199
 
217 200
 <script>
218
-import { getDataConfig } from "@/utils/data";
219
-export default {
220
-  name: "DialysisPrescription",
221
-  data() {
222
-    return {
223
-      title: "透析处方",
224
-      perfusion_apparatus_map: {},
225
-      dialysateFormulationMap: {}
226
-    };
227
-  },
228
-  props: {
229
-    prescription: {
230
-      type: Object
231
-    },
232
-    solution: {
233
-      type: Object
234
-    },
235
-    device_number_map: {
236
-      type: Object
237
-    }
238
-  },
239
-  computed: {
240
-    target_ultrafiltration: function() {
241
-      var v = this.getValueStr(
242
-        "target_ultrafiltration",
243
-        "target_ultrafiltration"
244
-      );
245
-      v = this.getFloat(v);
246
-      return v.length == 0 ? "0" : v;
247
-    },
248
-    dialysis_mode: function() {
249
-      var mode = this.getValueStr("mode_id", "mode_id");
250
-      if (mode.length == 0) {
251
-        return "";
252
-      }
253
-      if (this.$store.getters.treatment_mode[mode] != undefined) {
254
-        return this.$store.getters.treatment_mode[mode].name;
255
-      }
256
-      return "";
257
-    },
258
-    perfusion_apparatus: function() {
259
-      var v = this.getValueStr("perfusion_apparatus", "perfusion_apparatus");
260
-      if (v.length == 0) {
261
-        return "";
262
-      }
263
-      if (this.perfusion_apparatus_map[v] != undefined) {
264
-        return this.perfusion_apparatus_map[v].name;
201
+  import {getDataConfig} from '@/utils/data'
202
+  export default {
203
+    name: 'DialysisPrescription',
204
+    data () {
205
+      return {
206
+        title: '透析处方',
207
+        perfusion_apparatus_map: {},
208
+        dialysateFormulationMap: {}
265 209
       }
266
-      return "";
267
-    },
268
-    displace_liqui: function() {
269
-      var v = this.getValueStr("displace_liqui", "displace_liqui");
270
-      return v.length == 0 ? "0" : v;
271
-    },
272
-    anticoagulant_shouji: function() {
273
-      var v = this.getValueStr("anticoagulant_shouji", "anticoagulant_shouji");
274
-      return v.length == 0 ? "0" : v;
275
-    },
276
-    kalium: function() {
277
-      var v = this.getValueStr("kalium", "kalium");
278
-      v = this.getFloat(v);
279
-      return v == 0 ? "0" : v;
280
-    },
281
-    replacement_total: function() {
282
-      var v = this.getValueStr("replacement_total", "replacement_total");
283
-      return v.length == 0 ? "0" : v;
284 210
     },
285
-    bicarbonate: function() {
286
-      var v = this.getValueStr("bicarbonate", "bicarbonate");
287
-      return v.length == 0 ? "0" : v;
288
-    },
289
-    dialysate_flow: function() {
290
-      var v = this.getValueStr("dialysate_flow", "dialysate_flow");
291
-      return v.length == 0 ? "0" : v;
292
-    },
293
-    dialysis_duration: function() {
294
-      var dialysis_duration_hour = this.getValueStr(
295
-        "dialysis_duration_hour",
296
-        "dialysis_duration_hour"
297
-      );
298
-      var dialysis_duration_minute = this.getValueStr(
299
-        "dialysis_duration_minute",
300
-        "dialysis_duration_minute"
301
-      );
302
-      if (
303
-        dialysis_duration_hour.length == 0 &&
304
-        dialysis_duration_minute.length == 0
305
-      ) {
306
-        return "0";
307
-      } else {
308
-        var time =
309
-          dialysis_duration_hour + "h" + dialysis_duration_minute + "min";
310
-        return time.length == 0 ? "0" : time;
311
-      }
312
-    },
313
-    blood_flow_volume: function() {
314
-      var v = this.getValueStr("blood_flow_volume", "blood_flow_volume");
315
-      return v.length == 0 ? "0" : v;
316
-    },
317
-    replacement_way: function() {
318
-      return this.getValueStr("replacement_way", "replacement_way");
319
-    },
320
-    anticoagulant_weichi: function() {
321
-      var v = this.getValueStr("anticoagulant_weichi", "anticoagulant_weichi");
322
-      return v.length == 0 ? "0" : v;
323
-    },
324
-    sodium: function() {
325
-      var v = this.getValueStr("sodium", "sodium");
326
-      console.log(v);
327
-      v = this.getFloat(v);
328
-      console.log(v);
329
-      return v == 0 ? "0" : v;
330
-    },
331
-    glucose: function() {
332
-      var v = this.getValueStr("glucose", "glucose");
333
-      return v.length == 0 ? "0" : v;
334
-    },
335
-    dialysate_temperature: function() {
336
-      var v = this.getValueStr(
337
-        "dialysate_temperature",
338
-        "dialysate_temperature"
339
-      );
340
-      return v.length == 0 ? "0" : v;
341
-    },
342
-    dialyzer: function() {
343
-      var v = this.getValueStr("dialyzer", "hemodialysis_machine");
344
-      if (v.length == 0) {
345
-        return "";
346
-      }
347
-      if (this.device_number_map[v] != undefined) {
348
-        return this.device_number_map[v].name;
211
+    props: {
212
+      prescription: {
213
+        type: Object
214
+      },
215
+      solution: {
216
+        type: Object
217
+      },
218
+      device_number_map: {
219
+        type: Object
349 220
       }
350
-      return "";
351
-    },
352
-    dialysate_formulation: function() {
353
-      var v = this.getValueStr(
354
-        "dialysate_formulation",
355
-        "dialysate_formulation"
356
-      );
357
-      if (v.length == 0) {
358
-        return "";
359
-      }
360
-      if (v in this.dialysateFormulationMap) {
361
-        return this.dialysateFormulationMap[v].name;
362
-      }
363
-      return "";
364
-    },
365
-    prescription_dewatering: function() {
366
-      var v = this.getValueStr("prescription_dewatering", "dewater");
367
-      return v.length == 0 ? "0" : v;
368
-    },
369
-    anticoagulant: function() {
370
-      var v = this.getValueStr("anticoagulant", "anticoagulant");
371
-      if (v.length == 0) {
372
-        return "";
373
-      }
374
-      if (this.$store.getters.anticoagulants_confit[v] != undefined) {
375
-        return this.$store.getters.anticoagulants_confit[v].name;
376
-      }
377
-      return "";
378
-    },
379
-    anticoagulant_zongliang: function() {
380
-      var v = this.getValueStr(
381
-        "anticoagulant_zongliang",
382
-        "anticoagulant_zongliang"
383
-      );
384
-      return v.length == 0 ? "0" : v;
385
-    },
386
-    calcium: function() {
387
-      var v = this.getValueStr("calcium", "calcium");
388
-      v = this.getFloat(v);
389
-      return v == 0 ? "0" : v;
390 221
     },
222
+    computed: {
223
+      target_ultrafiltration: function () {
224
+        var v = this.getValueStr('target_ultrafiltration', 'target_ultrafiltration')
225
+        v = this.getFloat(v)
226
+        return v.length == 0 ? '0' : v
227
+      },
228
+      dialysis_mode: function () {
229
+        var mode = this.getValueStr('mode_id', 'mode_id')
230
+        if (mode.length == 0) {
231
+          return ''
232
+        }
233
+        if (this.$store.getters.treatment_mode[mode] != undefined) {
234
+          return this.$store.getters.treatment_mode[mode].name
235
+        }
236
+        return ''
237
+      },
238
+      perfusion_apparatus: function () {
239
+        var v = this.getValueStr('perfusion_apparatus', 'perfusion_apparatus')
240
+        if (v.length == 0) {
241
+          return ''
242
+        }
243
+        if (this.perfusion_apparatus_map[v] != undefined) {
244
+          return this.perfusion_apparatus_map[v].name
245
+        }
246
+        return ''
247
+      },
248
+      displace_liqui: function () {
249
+        var v = this.getValueStr('displace_liqui', 'displace_liqui')
250
+        return v.length == 0 ? '0' : v
251
+      },
252
+      anticoagulant_shouji: function () {
253
+        var v = this.getValueStr('anticoagulant_shouji', 'anticoagulant_shouji')
254
+        return v.length == 0 ? '0' : v
255
+      },
256
+      kalium: function () {
257
+        var v = this.getValueStr('kalium', 'kalium')
258
+        v = this.getFloat(v)
259
+        return v == 0 ? '0' : v
260
+      },
261
+      replacement_total: function () {
262
+        var v = this.getValueStr('replacement_total', 'replacement_total')
263
+        return v.length == 0 ? '0' : v
264
+      },
265
+      bicarbonate: function () {
266
+        var v = this.getValueStr('bicarbonate', 'bicarbonate')
267
+        return v.length == 0 ? '0' : v
268
+      },
269
+      dialysate_flow: function () {
270
+        var v = this.getValueStr('dialysate_flow', 'dialysate_flow')
271
+        return v.length == 0 ? '0' : v
272
+      },
273
+      dialysis_duration: function () {
274
+        var dialysis_duration_hour = (this.getValueStr('dialysis_duration_hour', 'dialysis_duration_hour'))
275
+        var dialysis_duration_minute = (this.getValueStr('dialysis_duration_minute', 'dialysis_duration_minute'))
276
+        if (dialysis_duration_hour.length == 0 && dialysis_duration_minute.length == 0) {
277
+          return '0'
278
+        } else {
279
+          var time = dialysis_duration_hour + 'h' + dialysis_duration_minute + 'min'
280
+          return time.length == 0 ? '0' : time
281
+        }
282
+      },
283
+      blood_flow_volume: function () {
284
+        var v = this.getValueStr('blood_flow_volume', 'blood_flow_volume')
285
+        return v.length == 0 ? '0' : v
286
+      },
287
+      replacement_way: function () {
288
+        return this.getValueStr('replacement_way', 'replacement_way')
289
+      },
290
+      anticoagulant_weichi: function () {
291
+        var v = this.getValueStr('anticoagulant_weichi', 'anticoagulant_weichi')
292
+        return v.length == 0 ? '0' : v
293
+      },
294
+      sodium: function () {
295
+        var v = this.getValueStr('sodium', 'sodium')
296
+        console.log(v)
297
+        v = this.getFloat(v)
298
+        console.log(v)
299
+        return v == 0 ? '0' : v
300
+      },
301
+      glucose: function () {
302
+        var v = this.getValueStr('glucose', 'glucose')
303
+        return v.length == 0 ? '0' : v
304
+      },
305
+      dialysate_temperature: function () {
306
+        var v = this.getValueStr('dialysate_temperature', 'dialysate_temperature')
307
+        return v.length == 0 ? '0' : v
308
+      },
309
+      dialyzer: function () {
310
+        var v = this.getValueStr('dialyzer', 'hemodialysis_machine')
311
+        if (v.length == 0) {
312
+          return ''
313
+        }
314
+        if (this.device_number_map[v] != undefined) {
315
+          return this.device_number_map[v].name
316
+        }
317
+        return ''
318
+      },
319
+      dialysate_formulation: function () {
320
+        var v = this.getValueStr('dialysate_formulation', 'dialysate_formulation')
321
+        if (v.length == 0) {
322
+          return ''
323
+        }
324
+        if (v in this.dialysateFormulationMap) {
325
+          return this.dialysateFormulationMap[v].name
326
+        }
327
+        return ''
328
+      },
329
+      prescription_dewatering: function () {
330
+        var v = this.getValueStr('prescription_dewatering', 'dewater')
331
+        return v.length == 0 ? '0' : v
332
+      },
333
+      anticoagulant: function () {
334
+        var v = this.getValueStr('anticoagulant', 'anticoagulant')
335
+        if (v.length == 0) {
336
+          return ''
337
+        }
338
+        if (this.$store.getters.anticoagulants_confit[v] != undefined) {
339
+          return this.$store.getters.anticoagulants_confit[v].name
340
+        }
341
+        return ''
342
+      },
343
+      anticoagulant_zongliang: function () {
344
+        var v = this.getValueStr('anticoagulant_zongliang', 'anticoagulant_zongliang')
345
+        return v.length == 0 ? '0' : v
346
+      },
347
+      calcium: function () {
348
+        var v = this.getValueStr('calcium', 'calcium')
349
+        v = this.getFloat(v)
350
+        return v == 0 ? '0' : v
351
+      },
391 352
 
392
-    conductivity: function() {
393
-      var v = this.getValueStr("conductivity", "conductivity");
394
-      return v.length == 0 ? "0" : v;
395
-    },
396
-    dialyzer_perfusion_apparatus: function() {
397
-      return this.getValueStr(
398
-        "dialyzer_perfusion_apparatus",
399
-        "dialyzer_perfusion_apparatus"
400
-      );
401
-    },
402
-    note: function() {
403
-      return this.getValueStr("remark", "remark");
404
-    },
405
-    body_fluid: function() {
406
-      var id = this.getValueStr("body_fluid", "body_fluid");
407
-      if (id == 0) {
408
-        return "";
409
-      }
410
-      var bodyFluidOptions = this.$store.getters.body_fluid;
411
-      for (let i = 0; i < bodyFluidOptions.length; i++) {
412
-        if (bodyFluidOptions[i].id == id) {
413
-          return bodyFluidOptions[i].name;
353
+      conductivity: function () {
354
+        var v = this.getValueStr('conductivity', 'conductivity')
355
+        return v.length == 0 ? '0' : v
356
+      },
357
+      dialyzer_perfusion_apparatus: function () {
358
+        return this.getValueStr('dialyzer_perfusion_apparatus', 'dialyzer_perfusion_apparatus')
359
+      },
360
+      note: function () {
361
+        return this.getValueStr('remark', 'remark')
362
+      },
363
+      body_fluid: function () {
364
+        var id = this.getValueStr('body_fluid', 'body_fluid')
365
+        if (id == 0) {
366
+          return ''
414 367
         }
415
-      }
416
-    },
417
-    special_medicine: function() {
418
-      var id = this.getValueStr("special_medicine", "special_medicine");
419
-      if (id == 0) {
420
-        return "";
421
-      }
422
-      var special_medicine = this.$store.getters.special_medicine;
423
-      for (let i = 0; i < special_medicine.length; i++) {
424
-        if (special_medicine[i].id == id) {
425
-          return special_medicine[i].name;
368
+        var bodyFluidOptions = this.$store.getters.body_fluid
369
+        for (let i = 0; i < bodyFluidOptions.length; i++) {
370
+          if (bodyFluidOptions[i].id == id) {
371
+            return bodyFluidOptions[i].name
372
+          }
426 373
         }
427
-      }
428
-    },
429
-    special_medicine_other: function() {
430
-      return this.getValueStr(
431
-        "special_medicine_other",
432
-        "special_medicine_other"
433
-      );
434
-    },
435
-    blood_access: function() {
436
-      var id = this.getValueStr("blood_access", "blood_access");
437
-      if (id == 0) {
438
-        return "";
439
-      }
440
-      var blood_access = this.$store.getters.blood_access;
441
-      console.log("blood_access", blood_access);
442
-      for (let i = 0; i < blood_access.length; i++) {
443
-        if (blood_access[i].id == id) {
444
-          return blood_access[i].name;
374
+      },
375
+      special_medicine: function () {
376
+        var id = this.getValueStr('special_medicine', 'special_medicine')
377
+        if (id == 0) {
378
+          return ''
445 379
         }
446
-      }
447
-    },
448
-    displace_liqui: function() {
449
-      var id = this.getValueStr("displace_liqui_part", "displace_liqui_part");
450
-      var displace_liqui_value = this.getValueStr(
451
-        "displace_liqui_value",
452
-        "displace_liqui_value"
453
-      );
454
-      var displace_liqui_part = "";
455
-      var displace_liqui = this.$store.getters.displace_liqui;
456
-      for (let i = 0; i < displace_liqui.length; i++) {
457
-        if (displace_liqui[i].id == id) {
458
-          displace_liqui_part = displace_liqui[i].name;
380
+        var special_medicine = this.$store.getters.special_medicine
381
+        for (let i = 0; i < special_medicine.length; i++) {
382
+          if (special_medicine[i].id == id) {
383
+            return special_medicine[i].name
384
+          }
385
+        }
386
+      },
387
+      special_medicine_other: function () {
388
+        return this.getValueStr('special_medicine_other', 'special_medicine_other')
389
+      },
390
+      blood_access: function () {
391
+        var id = this.getValueStr('blood_access', 'blood_access')
392
+        if (id == 0) {
393
+          return ''
459 394
         }
395
+        var blood_access = this.$store.getters.blood_access
396
+        console.log('blood_access', blood_access)
397
+        for (let i = 0; i < blood_access.length; i++) {
398
+          if (blood_access[i].id == id) {
399
+            return blood_access[i].name
400
+          }
401
+        }
402
+      },
403
+      displace_liqui: function () {
404
+        var id = this.getValueStr('displace_liqui_part', 'displace_liqui_part')
405
+        var displace_liqui_value = this.getValueStr('displace_liqui_value', 'displace_liqui_value')
406
+        var displace_liqui_part = ''
407
+        var displace_liqui = this.$store.getters.displace_liqui
408
+        for (let i = 0; i < displace_liqui.length; i++) {
409
+          if (displace_liqui[i].id == id) {
410
+            displace_liqui_part = displace_liqui[i].name
411
+          }
412
+        }
413
+        return displace_liqui_part + displace_liqui_value + 'L'
414
+      },
415
+      ultrafiltration: function () {
416
+        var v = this.getValueStr('ultrafiltration', 'ultrafiltration')
417
+        v = this.getFloat(v)
418
+        return v.length == 0 ? '0' : v
419
+      },
420
+      target_ktv: function () {
421
+        var v = this.getValueStr('target_ktv', 'target_ktv')
422
+        return v.length == 0 ? '0' : v
460 423
       }
461
-      return displace_liqui_part + displace_liqui_value + "L";
462
-    },
463
-    ultrafiltration: function() {
464
-      var v = this.getValueStr("ultrafiltration", "ultrafiltration");
465
-      v = this.getFloat(v);
466
-      return v.length == 0 ? "0" : v;
467 424
     },
468
-    target_ktv: function() {
469
-      var v = this.getValueStr("target_ktv", "target_ktv");
470
-      return v.length == 0 ? "0" : v;
471
-    }
472
-  },
473
-  created() {
474
-    var perfusion_apparatus = this.$store.getters.perfusion_apparatus;
475
-    var map = {};
476
-    for (let index = 0; index < perfusion_apparatus.length; index++) {
477
-      const p = perfusion_apparatus[index];
478
-      map[p.id] = p;
479
-    }
480
-    this.perfusion_apparatus_map = map;
425
+    created () {
426
+      var perfusion_apparatus = this.$store.getters.perfusion_apparatus
427
+      var map = {}
428
+      for (let index = 0; index < perfusion_apparatus.length; index++) {
429
+        const p = perfusion_apparatus[index]
430
+        map[p.id] = p
431
+      }
432
+      this.perfusion_apparatus_map = map
481 433
 
482
-    var dialysateFormulationOptions = getDataConfig(
483
-      "hemodialysis",
484
-      "dialysate_formulation"
485
-    );
486
-    for (var index in dialysateFormulationOptions) {
487
-      this.dialysateFormulationMap[dialysateFormulationOptions[index].id] =
488
-        dialysateFormulationOptions[index];
489
-    }
490
-  },
491
-  methods: {
492
-    isShow(name) {
493
-      var filedList = this.$store.getters.user.fileds;
494
-      for (let i = 0; i < filedList.length; i++) {
495
-        if (
496
-          filedList[i].module == 1 &&
497
-          filedList[i].filed_name_cn == name &&
498
-          filedList[i].is_show == 1
499
-        ) {
500
-          return true;
501
-        }
434
+      var dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
435
+      for (var index in dialysateFormulationOptions) {
436
+        this.dialysateFormulationMap[dialysateFormulationOptions[index].id] = dialysateFormulationOptions[index]
502 437
       }
503
-      return false;
504 438
     },
505
-    getValueStr(pkey, skey) {
506
-      if (
507
-        (this.prescription == null || this.prescription.id == "") &&
508
-        (this.solution == null || this.solution.id == "")
509
-      ) {
510
-        return "";
511
-      } else if (this.prescription != null && this.prescription.id != "") {
512
-        if (
513
-          this.prescription[pkey] == null ||
514
-          this.prescription[pkey] == undefined
515
-        ) {
516
-          return "";
517
-        }
518
-        return this.prescription[pkey] + "";
519
-      } else {
520
-        if (this.solution[skey] == null || this.solution[skey] == undefined) {
521
-          return "";
439
+    methods: {
440
+      isShow (name) {
441
+        var filedList = this.$store.getters.user.fileds
442
+        for (let i = 0; i < filedList.length; i++) {
443
+          if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
444
+            return true
445
+          }
522 446
         }
523
-        return this.solution[skey] + "";
524
-      }
525
-    },
526
-    getFloat: function(x) {
527
-      if (x != ".") {
528
-        var f = Math.round(x * 100) / 100;
529
-        var s = f.toString();
530
-        var rs = s.indexOf(".");
531
-        if (rs <= 0) {
532
-          rs = s.length;
533
-          s += ".";
447
+        return false
448
+      },
449
+      getValueStr (pkey, skey) {
450
+        if ((this.prescription == null || this.prescription.id == '') && (this.solution == null || this.solution.id == '')) {
451
+          return ''
452
+        } else if (this.prescription != null && this.prescription.id != '') {
453
+          if (this.prescription[pkey] == null || this.prescription[pkey] == undefined) {
454
+            return ''
455
+          }
456
+          return this.prescription[pkey] + ''
457
+        } else {
458
+          if (this.solution[skey] == null || this.solution[skey] == undefined) {
459
+            return ''
460
+          }
461
+          return this.solution[skey] + ''
534 462
         }
535
-        while (s.length <= rs + 1) {
536
-          s += "0";
463
+      },
464
+      getFloat: function (x) {
465
+        if (x != '.') {
466
+          var f = Math.round(x * 100) / 100
467
+          var s = f.toString()
468
+          var rs = s.indexOf('.')
469
+          if (rs <= 0) {
470
+            rs = s.length
471
+            s += '.'
472
+          }
473
+          while (s.length <= rs + 1) {
474
+            s += '0'
475
+          }
476
+          return s
477
+        } else {
478
+          return '0.0'
537 479
         }
538
-        return s;
539
-      } else {
540
-        return "0.0";
541 480
       }
542 481
     }
543 482
   }
544
-};
545 483
 </script>
546 484
 
547 485
 <style rel="stylesheet/scss" lang="scss" scoped></style>