Browse Source

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

XMLWAN 5 years ago
parent
commit
c8b5ebd0a6

+ 83 - 81
src/utils/tools.js View File

@@ -1,132 +1,134 @@
1 1
 export function getFileExtension(filename) {
2
-  var tempArr = filename.split(".");
3
-  var ext;
4
-  if (tempArr.length === 1 || (tempArr[0] === "" && tempArr.length === 2)) {
5
-    ext = "";
2
+  var tempArr = filename.split('.')
3
+  var ext
4
+  if (tempArr.length === 1 || (tempArr[0] === '' && tempArr.length === 2)) {
5
+    ext = ''
6 6
   } else {
7
-    ext = tempArr.pop().toLowerCase(); // get the extension and make it lower-case
7
+    ext = tempArr.pop().toLowerCase() // get the extension and make it lower-case
8 8
   }
9
-  return ext;
9
+  return ext
10 10
 }
11 11
 
12 12
 export function isCardNo(card) {
13 13
   // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
14
-  var reg_18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
15
-  var reg_15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
14
+  var reg_18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
15
+  var reg_15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/
16 16
 
17
-  return reg_18.test(card) || reg_15.test(card);
17
+  return reg_18.test(card) || reg_15.test(card)
18 18
 }
19 19
 
20 20
 export function jsGetAge(strBirthday, splitstr) {
21
-  var returnAge;
22
-  var strBirthdayArr = strBirthday.split(splitstr);
23
-  var birthYear = strBirthdayArr[0];
24
-  var birthMonth = strBirthdayArr[1];
25
-  var birthDay = strBirthdayArr[2];
26
-  var d = new Date();
27
-  var nowYear = d.getFullYear();
28
-  var nowMonth = d.getMonth() + 1;
29
-  var nowDay = d.getDate();
21
+  debugger
22
+  var returnAge
23
+  var strBirthdayArr = strBirthday.split(splitstr)
24
+  var birthYear = strBirthdayArr[0]
25
+  var birthMonth = strBirthdayArr[1]
26
+  var birthDay = strBirthdayArr[2]
27
+  var d = new Date()
28
+  var nowYear = d.getFullYear()
29
+  var nowMonth = d.getMonth() + 1
30
+  var nowDay = d.getDate()
30 31
   if (nowYear == birthYear) {
31
-    returnAge = 0; // 同年 则为0岁
32
+    returnAge = 0 // 同年 则为0岁
32 33
   } else {
33
-    var ageDiff = nowYear - birthYear; // 年之差
34
+    var ageDiff = nowYear - birthYear // 年之差
34 35
     if (ageDiff > 0) {
35 36
       if (nowMonth == birthMonth) {
36
-        var dayDiff = nowDay - birthDay; // 日之差
37
+        var dayDiff = nowDay - birthDay // 日之差
37 38
         if (dayDiff < 0) {
38
-          returnAge = ageDiff - 1;
39
+          returnAge = ageDiff - 1
39 40
         } else {
40
-          returnAge = ageDiff;
41
+          returnAge = ageDiff
41 42
         }
42 43
       } else {
43
-        var monthDiff = nowMonth - birthMonth; // 月之差
44
+        var monthDiff = nowMonth - birthMonth // 月之差
44 45
         if (monthDiff < 0) {
45
-          returnAge = ageDiff - 1;
46
+          returnAge = ageDiff - 1
46 47
         } else {
47
-          returnAge = ageDiff;
48
+          returnAge = ageDiff
48 49
         }
49 50
       }
50 51
     } else {
51
-      returnAge = -1; // 返回-1 表示出生日期输入错误 晚于今天
52
+      returnAge = -1 // 返回-1 表示出生日期输入错误 晚于今天
52 53
     }
53 54
   }
54 55
 
55
-  return returnAge; // 返回周岁年龄
56
+  return returnAge // 返回周岁年龄
56 57
 }
57 58
 
58 59
 export function isPositiveInteger(s) {
59 60
   // 是否为正整数
60
-  var re = /^[0-9]+$/;
61
-  return re.test(s);
61
+  var re = /^[0-9]+$/
62
+  return re.test(s)
62 63
 }
63 64
 
64 65
 export function isPositiveNumber(s) {
65
-  var re = /^\d+(\.\d+)?$/;
66
-  return re.test(s);
66
+  var re = /^\d+(\.\d+)?$/
67
+  return re.test(s)
67 68
 }
68 69
 
69 70
 export function dialysisAge(firstDialysisDate) {
70
-  var dialysisAge;
71
-  var startDate = firstDialysisDate.split("-");
72
-  var startYear = startDate[0];
73
-  var startMonth = startDate[1];
74
-  var startDay = startDate[2];
75
-  var d = new Date();
76
-  var nowYear = d.getFullYear();
77
-  var nowMonth = d.getMonth() + 1;
78
-  var nowDay = d.getDate();
71
+  var dialysisAge
72
+  var startDate = firstDialysisDate.split('-')
73
+  var startYear = startDate[0]
74
+  var startMonth = startDate[1]
75
+  var startDay = startDate[2]
76
+  var d = new Date()
77
+  var nowYear = d.getFullYear()
78
+  var nowMonth = d.getMonth() + 1
79
+  var nowDay = d.getDate()
79 80
 
80
-  var diffYear = nowYear - startYear;
81
-  var diffMonth = nowMonth - startMonth;
82
-  var diffDay = nowDay - startDay;
81
+  var diffYear = nowYear - startYear
82
+  var diffMonth = nowMonth - startMonth
83
+  var diffDay = nowDay - startDay
83 84
   if (diffYear < 0) {
84
-    dialysisAge = "";
85
+    dialysisAge = ''
85 86
   } else if (diffYear == 0) {
86 87
     if (diffMonth < 0) {
87
-      dialysisAge = "";
88
+      dialysisAge = ''
88 89
     } else if (diffMonth == 0 && diffDay < 0) {
89
-      dialysisAge = "";
90
+      dialysisAge = ''
90 91
     } else {
91 92
       if (diffDay < 0) {
92
-        diffMonth -= 1;
93
+        diffMonth -= 1
93 94
       }
94
-      dialysisAge = diffMonth + "个月";
95
+      dialysisAge = diffMonth + '个月'
95 96
     }
96 97
   } else {
97 98
     if (diffDay < 0) {
98
-      diffMonth -= 1;
99
+      diffMonth -= 1
99 100
     }
100 101
     if (diffMonth < 0) {
101
-      diffYear -= 1;
102
-      diffMonth += 12;
102
+      diffYear -= 1
103
+      diffMonth += 12
103 104
     }
104 105
     if (diffYear > 0 && diffMonth > 0) {
105
-      dialysisAge = diffYear + "年零" + diffMonth + "个月";
106
+      dialysisAge = diffYear + '年零' + diffMonth + '个月'
106 107
     } else if (diffYear > 0) {
107
-      dialysisAge = diffYear + "年";
108
+      dialysisAge = diffYear + '年'
108 109
     } else {
109
-      dialysisAge = diffMonth + "个月";
110
+      dialysisAge = diffMonth + '个月'
110 111
     }
111 112
   }
112 113
 
113
-  return dialysisAge; // 返回周岁年龄
114
+  return dialysisAge // 返回周岁年龄
114 115
 }
115 116
 
116 117
 export function uParseTime(time, cFormat) {
117 118
   if (time === 0) {
118
-    return "";
119
+    return ''
119 120
   }
121
+ 
120 122
   if (arguments.length === 0) {
121
-    return null;
123
+    return null
122 124
   }
123
-  const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}";
124
-  let date;
125
-  if (typeof time === "object") {
126
-    date = time;
125
+  const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
126
+  let date
127
+  if (typeof time === 'object') {
128
+    date = time
127 129
   } else {
128
-    if (("" + time).length !== 13) time = parseInt(time) * 1000;
129
-    date = new Date(time);
130
+    if (('' + time).length !== 13) time = parseInt(time) * 1000
131
+    date = new Date(time)
130 132
   }
131 133
   const formatObj = {
132 134
     y: date.getFullYear(),
@@ -136,18 +138,18 @@ export function uParseTime(time, cFormat) {
136 138
     i: date.getMinutes(),
137 139
     s: date.getSeconds(),
138 140
     a: date.getDay()
139
-  };
141
+  }
140 142
   const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
141
-    let value = formatObj[key];
142
-    if (key === "a") {
143
-      return ["一", "二", "三", "四", "五", "六", "日"][value - 1];
143
+    let value = formatObj[key]
144
+    if (key === 'a') {
145
+      return ['一', '二', '三', '四', '五', '六', '日'][value - 1]
144 146
     }
145 147
     if (result.length > 0 && value < 10) {
146
-      value = "0" + value;
148
+      value = '0' + value
147 149
     }
148
-    return value || 0;
149
-  });
150
-  return time_str;
150
+    return value || 0
151
+  })
152
+  return time_str
151 153
 }
152 154
 
153 155
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
@@ -156,20 +158,20 @@ export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
156 158
   console.log(shichang)
157 159
   console.log(weichi)
158 160
 
159
-  var t = 0.5;
161
+  var t = 0.5
160 162
   if (type == 1) {
161
-    t = 0.5;
163
+    t = 0.5
162 164
   } else if (type == 2) {
163
-    t = 1;
165
+    t = 1
164 166
   } else {
165
-    return 0;
167
+    return 0
166 168
   }
167
-  shouji = parseFloat(shouji);
168
-  shichang = parseFloat(shichang);
169
-  weichi = parseFloat(weichi);
169
+  shouji = parseFloat(shouji)
170
+  shichang = parseFloat(shichang)
171
+  weichi = parseFloat(weichi)
170 172
   if (isNaN(shouji) || isNaN(shichang) || isNaN(weichi)) {
171
-    return 0;
173
+    return 0
172 174
   }
173 175
   console.log((shouji + (shichang - t) * weichi).toFixed(1))
174
-  return (shouji + (shichang - t) * weichi).toFixed(1);
176
+  return (shouji + (shichang - t) * weichi).toFixed(1)
175 177
 }

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order.vue View File

@@ -24,7 +24,7 @@
24 24
             </div>
25 25
             <div class="inline_block" style="margin-left: 25px;">
26 26
               年龄:
27
-              <div class="under_line" style="width: 50px;">{{jsGetAge(record.patient.birthday)}}</div>
27
+              <div class="under_line" style="width: 50px;">{{getAge(record.patient)}}</div>
28 28
29 29
             </div>
30 30
             <div class="inline_block" style="margin-left: 25px">

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_other.vue View File

@@ -34,7 +34,7 @@
34 34
             <div class="inline_block" style="margin-left: 10px;">
35 35
               性别:
36 36
               <check-box text="男" :checked="record.patient.gender == 1"></check-box>
37
-              &nbsp
37
+              &nbsp;
38 38
               <check-box text="女" :checked="record.patient.gender == 2"></check-box>
39 39
             </div>
40 40
             <div class="inline_block" style="margin-left: 10px;">

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_other_two.vue View File

@@ -34,7 +34,7 @@
34 34
             <div class="inline_block" style="margin-left: 10px;">
35 35
               性别:
36 36
               <check-box text="男" :checked="record.patient.gender == 1"></check-box>
37
-              &nbsp
37
+              &nbsp;
38 38
               <check-box text="女" :checked="record.patient.gender == 2"></check-box>
39 39
             </div>
40 40
             <div class="inline_block" style="margin-left: 10px;">

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

@@ -23,7 +23,7 @@
23 23
               </div>
24 24
               <div class="inline_block" style="margin-left: 10px;">
25 25
                 年龄:
26
-                <div class="under_line" style="width: 30px;text-align: center;">{{getAge(record.patient)}}</div>
26
+                <div class="under_line" style="width: 30px;text-align: center;">{{record.patient.age}}</div>
27 27
28 28
               </div>
29 29
               <div class="inline_block">

+ 1 - 1
src/xt_pages/dialysis/details/DialysisPrescription.vue View File

@@ -457,7 +457,7 @@
457 457
             displace_liqui_part = displace_liqui[i].name
458 458
           }
459 459
         }
460
-        return displace_liqui_part + displace_liqui_value+"L"
460
+        return displace_liqui_part + displace_liqui_value
461 461
 
462 462
       },ultrafiltration:function () {
463 463
         var v = this.getValueStr("ultrafiltration", "ultrafiltration")

+ 103 - 107
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -65,7 +65,6 @@
65 65
           <el-row :gutter="20"> -->
66 66
 
67 67
 
68
-
69 68
           <el-col :span="8" v-if="isShows('抗凝剂')">
70 69
             <el-form-item label="抗凝剂:">
71 70
               <el-select v-model="dialysisPrescription.anticoagulant" placeholder="请选择" style="width:100%;"
@@ -81,8 +80,10 @@
81 80
 
82 81
           <el-col :span="8" v-if="anticoagulant.shouji != -1&&isShows('首剂')">
83 82
             <el-form-item :label="'首剂('+anticoagulant.shouji_unit+') : '">
84
-              <el-input type="number"  v-if="dialysisPrescription.anticoagulant != 1"  v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
85
-              <el-input type="number" disabled   v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
83
+              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
84
+                        v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
85
+              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
86
+                        v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
86 87
 
87 88
             </el-form-item>
88 89
           </el-col>
@@ -90,16 +91,20 @@
90 91
 
91 92
           <el-col :span="8" v-if="anticoagulant.weichi != -1&&isShows('维持')">
92 93
             <el-form-item :label="'维持('+anticoagulant.weichi_unit+') : '" v-if="anticoagulant.weichi != -1">
93
-              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"  v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
94
-              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"  v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
94
+              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
95
+                        v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
96
+              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
97
+                        v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
95 98
 
96 99
             </el-form-item>
97 100
           </el-col>
98 101
 
99 102
           <el-col :span="8" v-if="anticoagulant.zongliang != -1&&isShows('总量')">
100 103
             <el-form-item :label="'总量('+anticoagulant.zongliang_unit+') : '">
101
-              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1" v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
102
-              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
104
+              <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
105
+                        v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
106
+              <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
107
+                        v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
103 108
 
104 109
             </el-form-item>
105 110
           </el-col>
@@ -112,7 +117,6 @@
112 117
           </el-col>
113 118
 
114 119
 
115
-
116 120
           <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1&&isShows('钙名称')">
117 121
             <el-form-item label="钙名称 : ">
118 122
               <el-input v-model="dialysisPrescription.anticoagulant_gaimingcheng"
@@ -147,9 +151,6 @@
147 151
           </el-col>
148 152
 
149 153
 
150
-
151
-
152
-
153 154
           <el-col :span="8" v-if="isShows('碳酸氢盐')">
154 155
             <el-form-item label="碳酸氢盐(mmol/L):">
155 156
               <el-input type="number" v-model="dialysisPrescription.bicarbonate"></el-input>
@@ -174,7 +175,6 @@
174 175
           </el-col>
175 176
 
176 177
 
177
-
178 178
           <el-col :span="8" v-if="isShows('电导度')">
179 179
             <el-form-item label="电导度(mS/m): ">
180 180
               <el-input type="number" v-model="dialysisPrescription.conductivity"></el-input>
@@ -280,7 +280,6 @@
280 280
           </el-col>
281 281
 
282 282
 
283
-
284 283
           <!--透析耗材-->
285 284
           <el-col :span="8" v-if="isShows('血液透析干粉')&&config.is_open == 1">
286 285
             <el-form-item label="血液透析干粉:">
@@ -466,7 +465,7 @@
466 465
     >
467 466
 
468 467
       <el-checkbox-group v-model="checkedCities">
469
-        <el-checkbox  style="display: flex;align-items: center" v-for="(advice, index) in targetAdvices"
468
+        <el-checkbox style="display: flex;align-items: center" v-for="(advice, index) in targetAdvices"
470 469
                      :label="advice.id"
471 470
                      :key="index"
472 471
                      :value="advice.id"
@@ -508,7 +507,7 @@
508 507
       </div>
509 508
       <div class="newLine">
510 509
         <span>干体重(kg)</span>
511
-        <span>{{ last_predialysis?last_predialysis.dry_weight:''}}</span>
510
+        <span>{{ getDryWeight()}}</span>
512 511
       </div>
513 512
       <div class="newLine">
514 513
         <span>衣物重(kg)</span>
@@ -546,10 +545,9 @@
546 545
 <script>
547 546
   import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution } from '@/api/dialysis'
548 547
   import { getDataConfig } from '@/utils/data'
549
-  import { uParseTime } from '@/utils/tools'
548
+  import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
550 549
   import store from '@/store'
551 550
   import MsgTip from './MsgTip'
552
-  import { calculateAnticoagulantZL} from '@/utils/tools'
553 551
 
554 552
   export default {
555 553
     name: 'dialysisPrescriptionDialog',
@@ -675,7 +673,6 @@
675 673
         }
676 674
       },
677 675
 
678
-
679 676
       prescription: { // 透析处方
680 677
         type: Object,
681 678
         default: () => {
@@ -738,12 +735,12 @@
738 735
         default: () => {
739 736
           return { id: 0 }
740 737
         }
741
-      },last_prescription: {
738
+      }, last_prescription: {
742 739
         type: Object,
743 740
         default: () => {
744 741
           return { id: 0 }
745 742
         }
746
-      },
743
+      }
747 744
 
748 745
     },
749 746
     computed: {
@@ -756,7 +753,7 @@
756 753
         zhiShow: false,
757 754
         totalShow: false,
758 755
         huShow: false,
759
-        showName:'',
756
+        showName: '',
760 757
         isShowRemindAdvice: false,
761 758
         checkedCities: [],
762 759
         isVisibility: false,
@@ -771,7 +768,7 @@
771 768
         replacement_ways: [],
772 769
         anticoagulantsConfit: {},
773 770
         dialysate_formulation_options: [],
774
-        add_weight:0,
771
+        add_weight: 0,
775 772
         body_fluid_option: [],
776 773
         special_medicine_option: [],
777 774
         displace_liqui_part_option: [],
@@ -837,12 +834,9 @@
837 834
           package: '',
838 835
           a_liquid: '',
839 836
 
840
-
841 837
           no_anticoagulant_shouji: '0',
842 838
           no_anticoagulant_weichi: '0',
843
-          no_anticoagulant_zongliang: '0',
844
-
845
-
839
+          no_anticoagulant_zongliang: '0'
846 840
 
847 841
         },
848 842
 
@@ -867,46 +861,63 @@
867 861
       }
868 862
     },
869 863
     methods: {
870
-      getLastAfterWeight(record){
871
-        if(record != null&& record.id > 0){
872
-          if(record.weight_after > 0) {
864
+      getDryWeight() {
865
+        if (this.dry_weight != null && this.dry_weight.id > 0) {
866
+
867
+          return this.dry_weight.dry_weight
868
+
869
+        } else {
870
+
871
+          if (this.last_predialysis != null && this.last_predialysis.id > 0) {
872
+
873
+            return this.last_predialysis.dry_weight
874
+
875
+          } else {
876
+
877
+            return ''
878
+          }
879
+
880
+        }
881
+
882
+      },
883
+      getLastAfterWeight(record) {
884
+        if (record != null && record.id > 0) {
885
+          if (record.weight_after > 0) {
873 886
             let additional_weight = 0
874
-            if(this.predialysis.additional_weight != undefined){
887
+            if (this.predialysis.additional_weight != undefined) {
875 888
               additional_weight = this.predialysis.additional_weight
876 889
             }
877
-            return parseFloat(record.weight_after - additional_weight).toFixed(1);
878
-          }else{
890
+            return parseFloat(record.weight_after - additional_weight).toFixed(1)
891
+          } else {
879 892
             return ''
880 893
           }
881 894
         }
882 895
       },
883
-      getBeforeWeight(predialysis){
884
-        if(predialysis.id > 0){
885
-          if(predialysis.weight_before > 0) {
896
+      getBeforeWeight(predialysis) {
897
+        if (predialysis.id > 0) {
898
+          if (predialysis.weight_before > 0) {
886 899
             return predialysis.weight_before - predialysis.additional_weight
887
-          }else{
900
+          } else {
888 901
             return ''
889 902
           }
890 903
         }
891
-      }, getAfterWeight(record){
892
-        if(record.id > 0){
893
-          if(record.weight_after > 0) {
904
+      }, getAfterWeight(record) {
905
+        if (record.id > 0) {
906
+          if (record.weight_after > 0) {
894 907
             return record.weight_after - this.predialysis.additional_weight
895
-          }else{
908
+          } else {
896 909
             return ''
897 910
           }
898 911
         }
899 912
       },
900
-      isPermission () {
901
-        if (this.$store.getters.xt_user.user.user_type == 3 && ( this.$store.getters.xt_user.template_info.template_id == 2 ||  this.$store.getters.xt_user.template_info.template_id == 6)) {
913
+      isPermission() {
914
+        if (this.$store.getters.xt_user.user.user_type == 3 && (this.$store.getters.xt_user.template_info.template_id == 2 || this.$store.getters.xt_user.template_info.template_id == 6)) {
902 915
           return false
903 916
         } else {
904 917
           return true
905 918
         }
906 919
       },
907
-      setLastRecord:function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis){
908
-
909
-
920
+      setLastRecord: function(schedual, lastAssessmentAfterDislysis, lastPredialysisEvaluation, lastDialysisPrescribe, lastDryWeightDislysis) {
910 921
 
911 922
         this.treatment_mode = this.$store.getters.treatment_mode
912 923
         this.perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
@@ -923,8 +934,6 @@
923 934
         var date = this.$route.query && this.$route.query.date
924 935
         this.record_date = uParseTime(date, '{y}-{m}-{d}')
925 936
 
926
-
927
-
928 937
         if (this.prescription != null && typeof (this.prescription.id) != 'undefined' && this.prescription.id > 0) {
929 938
           for (const key in this.prescription) {
930 939
             this.dialysisPrescription[key] = this.prescription[key]
@@ -938,7 +947,7 @@
938 947
           for (const key in lastDialysisPrescribe) {
939 948
             this.dialysisPrescription[key] = lastDialysisPrescribe[key]
940 949
           }
941
-        } else{
950
+        } else {
942 951
 
943 952
           this.dialysisPrescription.mode_id = schedual.mode_id
944 953
         }
@@ -954,8 +963,6 @@
954 963
         }
955 964
         this.anticoagulant = this.anticoagulantsConfit[thismode]
956 965
 
957
-
958
-
959 966
       },
960 967
       menuMsgTip: function() {
961 968
         this.msgtip_visibility = false
@@ -1177,23 +1184,22 @@
1177 1184
         let last_weight_after = 0
1178 1185
         let weight_before = 0
1179 1186
 
1180
-        if(this.last_record == null){
1187
+        if (this.last_record == null) {
1181 1188
           last_weight_after = 0
1182
-        }else{
1189
+        } else {
1183 1190
           last_weight_after = this.last_record.weight_after
1184 1191
         }
1185 1192
 
1186
-        if(this.predialysis == null || this.predialysis.id == 0 ){
1193
+        if (this.predialysis == null || this.predialysis.id == 0) {
1187 1194
           weight_before = 0
1188
-        }else{
1195
+        } else {
1189 1196
           weight_before = this.predialysis.weight_before
1190 1197
         }
1191 1198
 
1192
-        if(weight_before > 0 && last_weight_after > 0){
1199
+        if (weight_before > 0 && last_weight_after > 0) {
1193 1200
           this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(2)
1194 1201
         }
1195 1202
 
1196
-
1197 1203
         this.isVisibility = true
1198 1204
         this.checkedCities = []
1199 1205
         for (let i = 0; i < this.targetAdvices.length; i++) {
@@ -1215,7 +1221,7 @@
1215 1221
         }
1216 1222
         this.anticoagulant = this.anticoagulantsConfit[thismode]
1217 1223
       }, handleCommit: function() {
1218
-        if(this.dialysisPrescription.anticoagulant == 1){
1224
+        if (this.dialysisPrescription.anticoagulant == 1) {
1219 1225
           this.dialysisPrescription.anticoagulant_weichi = '0'
1220 1226
           this.dialysisPrescription.anticoagulant_shouji = '0'
1221 1227
           this.dialysisPrescription.anticoagulant_zongliang = '0'
@@ -1229,7 +1235,6 @@
1229 1235
           }
1230 1236
         }
1231 1237
 
1232
-
1233 1238
         this.is_pre = 1
1234 1239
         if (this.prescription.id == 0) {
1235 1240
           if (this.is_open == 0) {
@@ -1583,7 +1588,7 @@
1583 1588
       }, handleCancle: function() {
1584 1589
         this.hide()
1585 1590
       }, handleSolution: function() {
1586
-        if(this.dialysisPrescription.anticoagulant == 1){
1591
+        if (this.dialysisPrescription.anticoagulant == 1) {
1587 1592
           this.dialysisPrescription.anticoagulant_weichi = '0'
1588 1593
           this.dialysisPrescription.anticoagulant_shouji = '0'
1589 1594
           this.dialysisPrescription.anticoagulant_zongliang = '0'
@@ -2097,7 +2102,7 @@
2097 2102
       }, handlePatientInfo() {
2098 2103
         this.isVisibility = false
2099 2104
         this.msgtip_visibility = true
2100
-      },cancleMsg(){
2105
+      }, cancleMsg() {
2101 2106
 
2102 2107
         this.isVisibility = true
2103 2108
         this.msgtip_visibility = false
@@ -2105,126 +2110,121 @@
2105 2110
     },
2106 2111
 
2107 2112
     watch: {
2108
-      "dialysisPrescription.dialysis_duration_hour":function(){
2109
-        let  dialysis_duration_minute = 0
2113
+      'dialysisPrescription.dialysis_duration_hour': function() {
2114
+        let dialysis_duration_minute = 0
2110 2115
         let dialysis_duration_hour = 0
2111 2116
         let duration = 0
2112 2117
 
2113
-        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2118
+        if (this.dialysisPrescription.dialysis_duration_minute == '') {
2114 2119
           dialysis_duration_minute = 0
2115
-        }else{
2120
+        } else {
2116 2121
           dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2117 2122
         }
2118 2123
 
2119
-        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2124
+        if (this.dialysisPrescription.dialysis_duration_hour == '') {
2120 2125
           dialysis_duration_hour = 0
2121 2126
 
2122
-        }else{
2127
+        } else {
2123 2128
 
2124 2129
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2125 2130
 
2126 2131
         }
2127 2132
         duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2128 2133
 
2129
-
2130
-
2131
-
2132
-        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2134
+        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1,
2133 2135
           this.dialysisPrescription.anticoagulant_shouji,
2134 2136
           duration,
2135 2137
           this.dialysisPrescription.anticoagulant_weichi
2136
-        );
2137
-        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2138
+        )
2139
+        if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
2138 2140
           this.dialysisPrescription.anticoagulant_zongliang = ''
2139 2141
         }
2140 2142
       },
2141
-      "dialysisPrescription.dialysis_duration_minute":function(){
2142
-        let  dialysis_duration_minute = 0
2143
+      'dialysisPrescription.dialysis_duration_minute': function() {
2144
+        let dialysis_duration_minute = 0
2143 2145
         let dialysis_duration_hour = 0
2144 2146
         let duration = 0
2145 2147
 
2146
-        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2148
+        if (this.dialysisPrescription.dialysis_duration_minute == '') {
2147 2149
           dialysis_duration_minute = 0
2148
-        }else{
2150
+        } else {
2149 2151
           dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2150 2152
         }
2151 2153
 
2152
-        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2154
+        if (this.dialysisPrescription.dialysis_duration_hour == '') {
2153 2155
           dialysis_duration_hour = 0
2154 2156
 
2155
-        }else{
2157
+        } else {
2156 2158
 
2157 2159
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2158 2160
 
2159 2161
         }
2160 2162
         duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2161 2163
 
2162
-
2163
-
2164
-        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2164
+        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1,
2165 2165
           this.dialysisPrescription.anticoagulant_shouji,
2166 2166
           duration,
2167 2167
           this.dialysisPrescription.anticoagulant_weichi
2168
-        );
2169
-        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2168
+        )
2169
+        if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
2170 2170
           this.dialysisPrescription.anticoagulant_zongliang = ''
2171 2171
         }
2172 2172
       },
2173
-      "dialysisPrescription.anticoagulant_shouji":function(){
2173
+      'dialysisPrescription.anticoagulant_shouji': function() {
2174 2174
 
2175
-        let  dialysis_duration_minute = 0
2175
+        let dialysis_duration_minute = 0
2176 2176
         let dialysis_duration_hour = 0
2177 2177
         let duration = 0
2178
-        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2178
+        if (this.dialysisPrescription.dialysis_duration_minute == '') {
2179 2179
           dialysis_duration_minute = 0
2180
-        }else{
2180
+        } else {
2181 2181
           dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2182 2182
         }
2183
-        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2183
+        if (this.dialysisPrescription.dialysis_duration_hour == '') {
2184 2184
           dialysis_duration_hour = 0
2185 2185
 
2186
-        }else{
2186
+        } else {
2187 2187
 
2188 2188
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2189 2189
 
2190 2190
         }
2191
-        duration = parseFloat(dialysis_duration_hour)  + parseFloat(dialysis_duration_minute) / 60
2192
-        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2191
+        duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2192
+        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1,
2193 2193
           this.dialysisPrescription.anticoagulant_shouji,
2194 2194
           duration,
2195 2195
           this.dialysisPrescription.anticoagulant_weichi
2196
-        );
2197
-        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2196
+        )
2197
+        if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
2198 2198
           this.dialysisPrescription.anticoagulant_zongliang = ''
2199 2199
         }
2200 2200
       },
2201
-      "dialysisPrescription.anticoagulant_weichi":function(){
2202
-        let  dialysis_duration_minute = 0
2201
+      'dialysisPrescription.anticoagulant_weichi': function() {
2202
+        let dialysis_duration_minute = 0
2203 2203
         let dialysis_duration_hour = 0
2204 2204
         let duration = 0
2205 2205
 
2206
-        if (this.dialysisPrescription.dialysis_duration_minute == ''){
2206
+        if (this.dialysisPrescription.dialysis_duration_minute == '') {
2207 2207
           dialysis_duration_minute = 0
2208
-        }else{
2208
+        } else {
2209 2209
           dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
2210 2210
         }
2211 2211
 
2212
-        if (this.dialysisPrescription.dialysis_duration_hour == ''){
2212
+        if (this.dialysisPrescription.dialysis_duration_hour == '') {
2213 2213
           dialysis_duration_hour = 0
2214 2214
 
2215
-        }else{
2215
+        } else {
2216 2216
 
2217 2217
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2218 2218
 
2219 2219
         }
2220
-        duration = parseFloat(dialysis_duration_hour)  + parseFloat(dialysis_duration_minute) / 60
2220
+        duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2221 2221
 
2222
-        this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2222
+        this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1,
2223 2223
           this.dialysisPrescription.anticoagulant_shouji,
2224 2224
           duration,
2225 2225
           this.dialysisPrescription.anticoagulant_weichi
2226
-        );
2227
-        if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
2226
+        )
2227
+        if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
2228 2228
           this.dialysisPrescription.anticoagulant_zongliang = ''
2229 2229
         }
2230 2230
       }, 'prescription.id': function() {
@@ -2233,17 +2233,14 @@
2233 2233
             this.dialysisPrescription[index] = this.prescription[index]
2234 2234
           }
2235 2235
 
2236
-
2237 2236
           if (this.prescription['dialysate_formulation'] == 0) {
2238 2237
             this.dialysisPrescription['dialysate_formulation'] = ''
2239 2238
           }
2240 2239
 
2241
-
2242 2240
           if (this.prescription['anticoagulant'] == 0) {
2243 2241
             this.dialysisPrescription['anticoagulant'] = ''
2244 2242
           }
2245 2243
 
2246
-
2247 2244
           if (this.prescription['dialysis_duration_hour'] == 0) {
2248 2245
             this.dialysisPrescription['dialysis_duration_hour'] = ''
2249 2246
           }
@@ -2376,7 +2373,6 @@
2376 2373
               this.dialysisPrescription['dialysate_formulation'] = ''
2377 2374
             }
2378 2375
 
2379
-
2380 2376
             if (this.solution['anticoagulant'] == 0) {
2381 2377
               this.dialysisPrescription['anticoagulant'] = ''
2382 2378
             }

+ 7 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

@@ -28,6 +28,9 @@
28 28
       <template  v-if="org_template_info.template_id == 6">
29 29
         <el-button  :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印</el-button>
30 30
       </template>
31
+      <template  v-if="org_template_info.template_id == 7">
32
+        <el-button  :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印</el-button>
33
+      </template>
31 34
       
32 35
     </div>
33 36
     <div class="app-container ">
@@ -53,6 +56,8 @@
53 56
 
54 57
       <DialysisPrintOrderSix v-bind:childResponse="childResponse" v-if="org_template_info.template_id == 6 "> </DialysisPrintOrderSix>
55 58
 
59
+      <DialysisPrintOrderSeven v-bind:childResponse="childResponse" v-if="org_template_info.template_id == 7 "> </DialysisPrintOrderSeven>
60
+
56 61
 
57 62
     </div>
58 63
   </div>
@@ -70,6 +75,7 @@
70 75
   import DialysisPrintOrderFour from './template/DialysisPrintOrderFour'
71 76
   import DialysisPrintOrderFive from './template/DialysisPrintOrderFive'
72 77
   import DialysisPrintOrderSix from './template/DialysisPrintOrderSix'
78
+  import DialysisPrintOrderSeven from './template/DialysisPrintOrderSeven'
73 79
   import print from 'print-js'
74 80
 
75 81
   export default {
@@ -81,6 +87,7 @@
81 87
       DialysisPrintOrderFour,
82 88
       DialysisPrintOrderFive,
83 89
       DialysisPrintOrderSix,
90
+      DialysisPrintOrderSeven,
84 91
       LabelBox,
85 92
       BreadCrumb
86 93
     },

+ 10 - 10
src/xt_pages/dialysis/template/DialysisPrintOrderOne.vue View File

@@ -817,18 +817,18 @@
817 817
         <tbody>
818 818
         <tr>
819 819
           <td width="40px">时间</td>
820
-          <td width="120px">医嘱内容</td>
821
-          <td width="80px">医生签名</td>
822
-          <td width="80px">执行护士</td>
823
-          <td width="55px">执行时间</td>
824
-          <td width="75px">核对护士</td>
820
+          <td width="120px">医嘱<br>内容</td>
821
+          <td width="80px">医生<br>签名</td>
822
+          <td width="80px">执行<br>护士</td>
823
+          <td width="55px">执行<br>时间</td>
824
+          <td width="75px">核对<br>护士</td>
825 825
           <td width="10px"></td>
826 826
           <td width="40px">时间</td>
827
-          <td width="120px">医嘱内容</td>
828
-          <td width="80px">医生签名</td>
829
-          <td width="80px">执行护士</td>
830
-          <td width="55px">执行时间</td>
831
-          <td width="75px">核对护士</td>
827
+          <td width="120px">医嘱<br>内容</td>
828
+          <td width="80px">医生<br>签名</td>
829
+          <td width="80px">执行<br>护士</td>
830
+          <td width="55px">执行<br>时间</td>
831
+          <td width="75px">核对<br>护士</td>
832 832
         </tr>
833 833
         <tr v-for="(advice, index) in advices" :key="index">
834 834
           <td height="10px">

+ 5 - 5
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -371,11 +371,11 @@
371 371
                   <div v-if="prescription.anticoagulant != 1"  class="under_line" style="width: 50px;text-align: center;">
372 372
                     {{prescription.anticoagulant_weichi?prescription.anticoagulant_weichi:"0"}}
373 373
                   </div>
374
-                  <span v-if="prescription.anticoagulant == 5">ml</span>
375
-                  <span v-if="prescription.anticoagulant == 4">mg</span>
376
-                  <span v-if="prescription.anticoagulant == 3">iu</span>
377
-                  <span v-if="prescription.anticoagulant == 2">iu</span>
378
-                  <span v-if="prescription.anticoagulant == 1">mg</span>
374
+                  <span v-if="prescription.anticoagulant == 5">ml/h</span>
375
+                  <span v-if="prescription.anticoagulant == 4">mg/h</span>
376
+                  <span v-if="prescription.anticoagulant == 3">iu/h</span>
377
+                  <span v-if="prescription.anticoagulant == 2">iu/h</span>
378
+                  <span v-if="prescription.anticoagulant == 1">mg/h</span>
379 379
 
380 380
                 </div>
381 381
                 <div class="inline_block" style="margin-left:20px;" v-if="prescription.anticoagulant == 5">