Browse Source

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

csx 5 years ago
parent
commit
6ed814d5ed

+ 6 - 0
src/utils/tools.js View File

@@ -154,6 +154,11 @@ export function uParseTime(time, cFormat) {
154 154
 }
155 155
 
156 156
 export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
157
+  console.log(type)
158
+  console.log(shouji)
159
+  console.log(shichang)
160
+  console.log(weichi)
161
+
157 162
   var t = 0.5;
158 163
   if (type == 1) {
159 164
     t = 0.5;
@@ -168,5 +173,6 @@ export function calculateAnticoagulantZL(type, shouji, shichang, weichi) {
168 173
   if (isNaN(shouji) || isNaN(shichang) || isNaN(weichi)) {
169 174
     return 0;
170 175
   }
176
+  console.log((shouji + (shichang - t) * weichi).toFixed(1))
171 177
   return (shouji + (shichang - t) * weichi).toFixed(1);
172 178
 }

+ 51 - 3
src/xt_pages/dialysis/details/NavIgation.vue View File

@@ -17,7 +17,10 @@
17 17
           </li>
18 18
           <li @click="showDoctorAdviceDialog">
19 19
             <img src="@/assets/record/4.png">
20
-            <p>临时医嘱</p>
20
+            <div>
21
+              <p>临时医嘱</p>
22
+              <span class="redpoint" v-if="getUnReadNum()">{{getUnReadNum()}}</span>
23
+            </div>
21 24
           </li>
22 25
           <li @click="showDoubleCheck">
23 26
             <img src="@/assets/record/5.png">
@@ -98,7 +101,7 @@
98 101
     <computer-dialog title="透析上机" ref="computer_dialog" :dialysis_order="dialysis_order" :schedule="schedual" @monitor="add_monitor"
99 102
                      :admins="admin_users" :device_numbers="device_numbers" :special_premission="special_premission"></computer-dialog>
100 103
 
101
-    <monitor-dialog title="透析监测" ref="monitor_dialog" :monitors="monitor_records" ></monitor-dialog>
104
+    <monitor-dialog title="透析监测" ref="monitor_dialog" :monitors="monitor_records" @monitor="add_monitor"></monitor-dialog>
102 105
 
103 106
     <finish-dialog title="透析下机" ref="finish_dialog" :dialysis_order="dialysis_order" :schedule="schedual"
104 107
                    :admins="admin_users"  :prescription="prescription"  @assessmentAfterDislysis="assessmentAfterDislysisFunc" :special_premission="special_premission"></finish-dialog>
@@ -408,6 +411,34 @@
408 411
 
409 412
     },
410 413
     methods: {
414
+      getUnReadNum:function(){
415
+        let doctorAdvice = []
416
+        for (let y = 0; y < this.doctor_advices.length; y++) {
417
+          if (this.doctor_advices[y].execution_state == 2) {
418
+            doctorAdvice.push(this.doctor_advices[y])
419
+          }
420
+        }
421
+        const sorted = this.groupBy(doctorAdvice, function (item) {
422
+          return [item.groupno]
423
+        })
424
+        console.log(doctorAdvice)
425
+        console.log(sorted.length)
426
+
427
+
428
+        return sorted.length
429
+
430
+      },
431
+      groupBy (array, f) {
432
+        const groups = {}
433
+        array.forEach(function (o) {
434
+          const group = JSON.stringify(f(o))
435
+          groups[group] = groups[group] || []
436
+          groups[group].push(o)
437
+        })
438
+        return Object.keys(groups).map(function (group) {
439
+          return groups[group]
440
+        })
441
+      },
411 442
       setLastRecord:function(lastPredialysisEvaluation,lastMonitorRecord,lastAssessmentAfterDislysis,lastDialysisPrescribe,lastDryWeightDislysis,schedual){
412 443
         console.log(lastPredialysisEvaluation)
413 444
         console.log(lastMonitorRecord)
@@ -427,10 +458,12 @@
427 458
 
428 459
       add_monitor:function(monitor){
429 460
 
430
-
431 461
         this.monitor_records.push(monitor)
462
+        console.log( this.monitor_records)
432 463
         this.monitor_records.sort((a, b) => b.operate_time - a.operate_time)
433 464
         this.monitor_records.reverse()
465
+        console.log( this.monitor_records)
466
+
434 467
         this.$refs.monitor_dialog.setRecords(this.monitor_records)
435 468
       },
436 469
       adviceFunc: function() {
@@ -509,5 +542,20 @@
509 542
   text-align: center;
510 543
   margin-bottom: 20px;
511 544
   }
545
+  .redpoint {
546
+  display: inline-block;
547
+  height: 30px;
548
+  width: 30px;
549
+  line-height: 26px;
550
+  text-align: center;
551
+  font-size: 0.8em;
552
+  border-radius: 20px;
553
+  color: #fff;
554
+  background: #f56c6c;
555
+  position: absolute;
556
+  top: -6px;
557
+  right: -8px;
558
+  border: 1px solid #fff;
559
+  }
512 560
 </style>
513 561
 

+ 2 - 2
src/xt_pages/dialysis/details/assessmentAfter.vue View File

@@ -11,7 +11,7 @@
11 11
         <li v-if="isShow('收缩压')">
12 12
           <label>收缩压 : </label>
13 13
           <span class="content" v-if="systolic_blood_pressure!='0'">{{ systolic_blood_pressure }}</span>
14
-          <span class="unit" v-if="systolic_blood_pressure!='0'">mmhg</span>
14
+          <span class="unit" v-if="systolic_blood_pressure!='0'">mmHg</span>
15 15
         </li>
16 16
         <li v-if="isShow('实际超滤量')">
17 17
           <label>实际超滤量: </label>
@@ -48,7 +48,7 @@
48 48
         <li v-if="isShow('舒张压')">
49 49
           <label>舒张压 : </label>
50 50
           <span class="content" v-if="diastolic_blood_pressure!='0'">{{ diastolic_blood_pressure }}</span>
51
-          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmhg</span>
51
+          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmHg</span>
52 52
         </li>
53 53
         <li v-if="isShow('实际置换量')">
54 54
           <label>实际置换量 : </label>

+ 2 - 2
src/xt_pages/dialysis/details/assessmentBefore.vue View File

@@ -11,7 +11,7 @@
11 11
         <li v-if="isShow('收缩压')">
12 12
           <label>收缩压 : </label>
13 13
           <span class="content" v-if="systolic_blood_pressure!='0'">{{ systolic_blood_pressure }}</span>
14
-          <span class="unit" v-if="systolic_blood_pressure!='0'">mmhg</span>
14
+          <span class="unit" v-if="systolic_blood_pressure!='0'">mmHg</span>
15 15
         </li>
16 16
         <li v-if="isShow('前次透析后')">
17 17
           <label>前次透析后: </label>
@@ -36,7 +36,7 @@
36 36
         <li v-if="isShow('舒张压')">
37 37
           <label>舒张压 : </label>
38 38
           <span class="content" v-if="diastolic_blood_pressure!='0'">{{ diastolic_blood_pressure }}</span>
39
-          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmhg</span>
39
+          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmHg</span>
40 40
         </li>
41 41
 
42 42
         <li v-if="isShow('透析频次')">

+ 55 - 24
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -63,11 +63,6 @@
63 63
           <!-- </el-row>
64 64
 
65 65
           <el-row :gutter="20"> -->
66
-          <el-col :span="8" v-if="isShows('透析液温度')">
67
-            <el-form-item label="透析液温度(°C):">
68
-              <el-input type="number" v-model="dialysisPrescription.dialysate_temperature"></el-input>
69
-            </el-form-item>
70
-          </el-col>
71 66
 
72 67
 
73 68
 
@@ -110,6 +105,14 @@
110 105
           </el-col>
111 106
 
112 107
 
108
+          <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
109
+            <el-form-item label="置换量(L):">
110
+              <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
111
+            </el-form-item>
112
+          </el-col>
113
+
114
+
115
+
113 116
           <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1&&isShows('钙名称')">
114 117
             <el-form-item label="钙名称 : ">
115 118
               <el-input v-model="dialysisPrescription.anticoagulant_gaimingcheng"
@@ -123,12 +126,6 @@
123 126
             </el-form-item>
124 127
           </el-col>
125 128
 
126
-          <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
127
-            <el-form-item label="置换量(L):">
128
-              <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
129
-            </el-form-item>
130
-          </el-col>
131
-
132 129
 
133 130
           <el-col :span="8" v-if="isShows('钾')">
134 131
             <el-form-item label="钾(mmol/L): ">
@@ -168,6 +165,13 @@
168 165
               <el-input type="number" v-model="dialysisPrescription.glucose"></el-input>
169 166
             </el-form-item>
170 167
           </el-col>
168
+
169
+          <el-col :span="8" v-if="isShows('透析液温度')">
170
+            <el-form-item label="透析液温度(°C):">
171
+              <el-input type="number" v-model="dialysisPrescription.dialysate_temperature"></el-input>
172
+            </el-form-item>
173
+          </el-col>
174
+
171 175
           <!-- </el-row>
172 176
 
173 177
           <el-row :gutter="20"> -->
@@ -507,7 +511,7 @@
507 511
       </div>
508 512
       <div class="newLine">
509 513
         <span>透前体重(kg)</span>
510
-        <span>{{ predialysis.weight_before }}</span>
514
+        <span>{{ getBeforeWeight(predialysis)}}</span>
511 515
       </div>
512 516
       <div class="newLine">
513 517
         <span>干体重(kg)</span>
@@ -525,7 +529,7 @@
525 529
       </div>
526 530
       <div class="newLine">
527 531
         <span>透后体重(kg)</span>
528
-        <span>{{ record.weight_after }}</span>
532
+        <span>{{ getAfterWeight(record) }}</span>
529 533
       </div>
530 534
       <div class="newLine">
531 535
         <span>体重减少(kg)</span>
@@ -870,6 +874,23 @@
870 874
       }
871 875
     },
872 876
     methods: {
877
+      getBeforeWeight(predialysis){
878
+        if(predialysis.id > 0){
879
+          if(predialysis.weight_before > 0) {
880
+            return predialysis.weight_before - predialysis.additional_weight
881
+          }else{
882
+            return ''
883
+          }
884
+        }
885
+      }, getAfterWeight(record){
886
+        if(record.id > 0){
887
+          if(record.weight_after > 0) {
888
+            return record.weight_after - this.predialysis.additional_weight
889
+          }else{
890
+            return ''
891
+          }
892
+        }
893
+      },
873 894
       isPermission () {
874 895
         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)) {
875 896
           return false
@@ -1147,16 +1168,26 @@
1147 1168
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1148 1169
       },
1149 1170
       show() {
1171
+        let last_weight_after = 0
1172
+        let weight_before = 0
1150 1173
 
1151
-        if (
1152
-          this.predialysis.weight_before > 0 &&
1153
-          this.last_record.weight_after > 0
1154
-        ) {
1155
-          this.add_weight = parseFloat(
1156
-            this.predialysis.weight_before - this.last_record.weight_after
1157
-          ).toFixed(2)
1174
+        if(this.last_record == null){
1175
+          last_weight_after = 0
1176
+        }else{
1177
+          last_weight_after = this.last_record.weight_after
1158 1178
         }
1159 1179
 
1180
+        if(this.predialysis == null || this.predialysis.id == 0 ){
1181
+          weight_before = 0
1182
+        }else{
1183
+          weight_before = this.predialysis.weight_before
1184
+        }
1185
+
1186
+        if(weight_before > 0){
1187
+          this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(2)
1188
+        }
1189
+
1190
+
1160 1191
         this.isVisibility = true
1161 1192
         this.checkedCities = []
1162 1193
         for (let i = 0; i < this.targetAdvices.length; i++) {
@@ -2059,7 +2090,7 @@
2059 2090
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2060 2091
 
2061 2092
         }
2062
-        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2093
+        duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2063 2094
 
2064 2095
 
2065 2096
 
@@ -2092,7 +2123,7 @@
2092 2123
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2093 2124
 
2094 2125
         }
2095
-        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2126
+        duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
2096 2127
 
2097 2128
 
2098 2129
 
@@ -2123,7 +2154,7 @@
2123 2154
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2124 2155
 
2125 2156
         }
2126
-        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2157
+        duration = parseFloat(dialysis_duration_hour)  + parseFloat(dialysis_duration_minute) / 60
2127 2158
         this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2128 2159
           this.dialysisPrescription.anticoagulant_shouji,
2129 2160
           duration,
@@ -2152,7 +2183,7 @@
2152 2183
           dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
2153 2184
 
2154 2185
         }
2155
-        duration = parseFloat(dialysis_duration_hour) * 60 + parseFloat(dialysis_duration_minute)
2186
+        duration = parseFloat(dialysis_duration_hour)  + parseFloat(dialysis_duration_minute) / 60
2156 2187
 
2157 2188
         this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
2158 2189
           this.dialysisPrescription.anticoagulant_shouji,

+ 2 - 0
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -598,6 +598,8 @@ export default {
598 598
 
599 599
             if (this.isAdd) {
600 600
               this.monitors.unshift(monitor)
601
+              this.monitors.sort((a, b) => b.operate_time - a.operate_time)
602
+              this.monitors.reverse()
601 603
             } else {
602 604
               for (let index = 0; index < this.monitors.length; index++) {
603 605
                 const m = this.monitors[index]

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

@@ -87,7 +87,20 @@
87 87
         if (this.record.id == 0) {
88 88
           return '-'
89 89
         }
90
-        return this.device_number_map[this.record.bed_id] == null ? '' :this.device_number_map[this.record.bed_id].zone_name +"-"+ this.device_number_map[this.record.bed_id].number
90
+
91
+
92
+        if(this.device_number_map[this.record.bed_id].number.indexOf(this.device_number_map[this.record.bed_id].zone_name) == -1){
93
+
94
+          return this.device_number_map[this.record.bed_id] == null ? '' :this.device_number_map[this.record.bed_id].zone_name +"-"+ this.device_number_map[this.record.bed_id].number
95
+
96
+
97
+        }else{
98
+
99
+          return this.device_number_map[this.record.bed_id].number
100
+
101
+        }
102
+
103
+
91 104
       },
92 105
       nurse: function() {
93 106
         if (this.record.id == 0) {

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

@@ -9,7 +9,7 @@
9 9
         <th v-if="isShow('血压')" width="72px">血压(mmHg)</th>
10 10
         <th v-if="isShow('脉搏')" width="80px">脉搏(次/分)</th>
11 11
         <th v-if="isShow('呼吸频率')" width="110px">呼吸频率(次/分)</th>
12
-        <th width="76px">静脉压/动脉压(mmhg)</th>
12
+        <th width="76px">静脉压/动脉压(mmHg)</th>
13 13
         <th v-if="isShow('血流量')" width="92px">血流量(ml/min)</th>
14 14
         <th v-if="isShow('跨膜压')" width="76px">跨膜压(mmhg)</th>
15 15
         <th v-if="isShow('超滤量') && template_id == 6" width="76px">超滤量(ml)</th>

+ 6 - 6
src/xt_pages/user/dialysisRecord.vue View File

@@ -164,7 +164,7 @@
164 164
             prop="predialysis_evaluation"
165 165
             width="140"
166 166
             align="center"
167
-            label="透前血压(mmhg)"
167
+            label="透前血压(mmHg)"
168 168
           >
169 169
             <template slot-scope="scope"
170 170
               ><span
@@ -180,7 +180,7 @@
180 180
             prop="assessment_after_dislysis"
181 181
             width="140"
182 182
             align="center"
183
-            label="透后血压(mmhg)"
183
+            label="透后血压(mmHg)"
184 184
           >
185 185
             <template slot-scope="scope"
186 186
               ><span
@@ -235,7 +235,7 @@
235 235
           >
236 236
             <template slot-scope="scope"
237 237
               ><span>{{
238
-                getNurseName(scope.row.treatment_summary)
238
+                getNurseName(scope.row.start_nurse)
239 239
               }}</span></template
240 240
             >
241 241
           </el-table-column>
@@ -335,7 +335,7 @@
335 335
                 <td>{{ setVascularAccess(item.prescription) }}</td>
336 336
                 <td>{{ setAnticoagulantsConfit(item.prescription) }}</td>
337 337
                 <td>{{ item.prescription.dialyzer_perfusion_apparatus }}</td>
338
-                <td>{{ getNurseName(item.treatment_summary) }}</td>
338
+                <td>{{ getNurseName(item.start_nurse) }}</td>
339 339
                 <td>{{ getDoctorName(item.treatment_summary) }}</td>
340 340
               </tr>
341 341
             </tbody>
@@ -539,11 +539,11 @@ export default {
539 539
       }
540 540
       return "";
541 541
     },
542
-    getNurseName(summary) {
542
+    getNurseName(start_nurse) {
543 543
       var dl = this.nurseOptions.length;
544 544
       if (dl > 0) {
545 545
         for (let index = 0; index < dl; index++) {
546
-          if ((this.nurseOptions[index].id = summary.zl_nurse)) {
546
+          if ((this.nurseOptions[index].id = start_nurse)) {
547 547
             return this.nurseOptions[index].name;
548 548
           }
549 549
         }