浏览代码

修改透析监测

张保健 4 年前
父节点
当前提交
3de77e7091
共有 1 个文件被更改,包括 114 次插入124 次删除
  1. 114 124
      src/pages/monitoring/index.vue

+ 114 - 124
src/pages/monitoring/index.vue 查看文件

79
               <th width="9%">透析号</th>
79
               <th width="9%">透析号</th>
80
               <th width="10%">排班时间</th>
80
               <th width="10%">排班时间</th>
81
               <th width="10%">透析模式</th>
81
               <th width="10%">透析模式</th>
82
+              <th width="10%">透析器</th>
82
               <th width="9%">目标超滤量</th>
83
               <th width="9%">目标超滤量</th>
83
               <th width="10%">体重(透前/透后)</th>
84
               <th width="10%">体重(透前/透后)</th>
84
               <th width="28%">监控预警(血压/心率)</th>
85
               <th width="28%">监控预警(血压/心率)</th>
86
           </table>
87
           </table>
87
 
88
 
88
           <table
89
           <table
89
-            class="table"
90
-            v-for="(items, index) in dialysis_scheduals"
91
-            :key="index"
92
-          >
90
+            class="table" v-for="(items, index) in dialysis_scheduals" :key="index" >
93
             <tr v-if="items.zone_name.length > 0">
91
             <tr v-if="items.zone_name.length > 0">
94
               <td width="8%">{{ items.zone_name }}</td>
92
               <td width="8%">{{ items.zone_name }}</td>
95
               <td width="6%"></td>
93
               <td width="6%"></td>
96
               <td width="9%"></td>
94
               <td width="9%"></td>
97
               <td width="10%"></td>
95
               <td width="10%"></td>
98
               <td width="10%"></td>
96
               <td width="10%"></td>
97
+              <td width="10%"> </td>
99
               <td width="9%"></td>
98
               <td width="9%"></td>
100
               <td width="10%"></td>
99
               <td width="10%"></td>
101
               <td width="28%"></td>
100
               <td width="28%"></td>
102
             </tr>
101
             </tr>
103
-            <tr
104
-              v-for="(item, index) in items.scheduals"
105
-              :key="index"
106
-              @click="clickfunction(item)"
107
-            >
102
+            <tr v-for="(item, index) in items.scheduals" :key="index" @click="clickfunction(item)" >
108
               <td width="8%" style="color:#409eff;">{{ item.patient.name }}</td>
103
               <td width="8%" style="color:#409eff;">{{ item.patient.name }}</td>
109
               <td width="6%">
104
               <td width="6%">
110
                 {{
105
                 {{
119
                 {{ parseTime(item.schedule_date, "{y}-{m}-{d}") }}
114
                 {{ parseTime(item.schedule_date, "{y}-{m}-{d}") }}
120
               </td>
115
               </td>
121
               <td width="10%">{{ item.treatment_mode.name }}</td>
116
               <td width="10%">{{ item.treatment_mode.name }}</td>
122
-              <td width="9%">
123
-                {{
124
-                  item.prescription.target_ultrafiltration
125
-                    ? item.prescription.target_ultrafiltration
126
-                    : ""
127
-                }}
128
-              </td>
117
+              <td width="10%">{{ item.prescription.dialyzer_perfusion_apparatus }}</td>
118
+              <td width="9%"> {{ item.prescription.target_ultrafiltration ? item.prescription.target_ultrafiltration  : "" }} </td>
129
               <td width="10%">
119
               <td width="10%">
130
                 {{
120
                 {{
131
                   item.assessment_before_dislysis.weight_before
121
                   item.assessment_before_dislysis.weight_before
242
 </template>
232
 </template>
243
 
233
 
244
 <script>
234
 <script>
245
-import SideBar from "@/pages/layout/SideBar";
246
-import Divider from "vux/src/components/divider/index";
247
-import { getMonitorList, GetAllZone, getPatientMonitors } from "@/api/monitor";
248
-import { parseTime } from "@/utils";
249
-import { Toast } from "vant";
235
+import SideBar from '@/pages/layout/SideBar'
236
+import Divider from 'vux/src/components/divider/index'
237
+import { getMonitorList, GetAllZone, getPatientMonitors } from '@/api/monitor'
238
+import { parseTime } from '@/utils'
239
+import { Toast } from 'vant'
250
 
240
 
251
 export default {
241
 export default {
252
-  name: "MonitoringIndex",
253
-  created() {
242
+  name: 'MonitoringIndex',
243
+  created () {
254
     this.queryParams.date = this.parseTime(
244
     this.queryParams.date = this.parseTime(
255
       new Date().getTime() / 1000,
245
       new Date().getTime() / 1000,
256
-      "{y}-{m}-{d}"
257
-    );
258
-    this.queryParams.partition = this.partition;
259
-    this.getMonitor(this.queryParams);
260
-    this.GetAllZone();
246
+      '{y}-{m}-{d}'
247
+    )
248
+    this.queryParams.partition = this.partition
249
+    this.getMonitor(this.queryParams)
250
+    this.GetAllZone()
261
   },
251
   },
262
-  data() {
252
+  data () {
263
     return {
253
     return {
264
       loading: false,
254
       loading: false,
265
       finished: false,
255
       finished: false,
272
       partition: 0,
262
       partition: 0,
273
       queryParams: {
263
       queryParams: {
274
         date: new Date(),
264
         date: new Date(),
275
-        partition: ""
265
+        partition: ''
276
       },
266
       },
277
-      patient_keyword: "",
267
+      patient_keyword: '',
278
       search_page: 1
268
       search_page: 1
279
-    };
269
+    }
280
   },
270
   },
281
   methods: {
271
   methods: {
282
-    clickfunction: function(val) {
272
+    clickfunction: function (val) {
283
       this.$router.push({
273
       this.$router.push({
284
-        path: "/details",
274
+        path: '/details',
285
         query: {
275
         query: {
286
           patient_id: val.patient_id,
276
           patient_id: val.patient_id,
287
           date: val.schedule_date,
277
           date: val.schedule_date,
288
           patient_name: val.patient.name
278
           patient_name: val.patient.name
289
         }
279
         }
290
-      });
280
+      })
291
     },
281
     },
292
-    getMonitor: function(queryParams) {
293
-      this.search_page = 1;
294
-      this.patient_keyword = "";
282
+    getMonitor: function (queryParams) {
283
+      this.search_page = 1
284
+      this.patient_keyword = ''
295
 
285
 
296
-      this.loading = true;
297
-      this.finished = false;
298
-      this.dialysis_scheduals = [];
286
+      this.loading = true
287
+      this.finished = false
288
+      this.dialysis_scheduals = []
299
       getMonitorList(queryParams).then(response => {
289
       getMonitorList(queryParams).then(response => {
300
-        this.loading = false;
301
-        this.finished = true;
290
+        this.loading = false
291
+        this.finished = true
302
         if (response.data.state == 0) {
292
         if (response.data.state == 0) {
303
-          return false;
293
+          return false
304
         } else {
294
         } else {
305
-          var scheduals = response.data.data.monitor;
306
-          var zoneMap = {};
307
-          var schedualMap = {};
295
+          var scheduals = response.data.data.monitor
296
+          var zoneMap = {}
297
+          var schedualMap = {}
308
 
298
 
309
           for (let index = 0; index < scheduals.length; index++) {
299
           for (let index = 0; index < scheduals.length; index++) {
310
-            const schedual = scheduals[index];
300
+            const schedual = scheduals[index]
311
             if (schedualMap[schedual.device_zone.name] == null) {
301
             if (schedualMap[schedual.device_zone.name] == null) {
312
-              schedualMap[schedual.device_zone.name] = [];
302
+              schedualMap[schedual.device_zone.name] = []
313
             }
303
             }
314
-            schedualMap[schedual.device_zone.name].push(schedual);
304
+            schedualMap[schedual.device_zone.name].push(schedual)
315
             if (zoneMap[schedual.device_zone.name] == null) {
305
             if (zoneMap[schedual.device_zone.name] == null) {
316
-              zoneMap[schedual.device_zone.name] = schedual.device_zone;
306
+              zoneMap[schedual.device_zone.name] = schedual.device_zone
317
             }
307
             }
318
           }
308
           }
319
 
309
 
320
-          var zones = [];
321
-          zones.push({ value: 0, text: "全部分区" });
310
+          var zones = []
311
+          zones.push({ value: 0, text: '全部分区' })
322
           for (var zoneName in zoneMap) {
312
           for (var zoneName in zoneMap) {
323
-            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
313
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName })
324
           }
314
           }
325
-          zones = zones.sort(function(a, b) {
326
-            return a.value > b.value;
327
-          });
328
-          this.zones = zones;
315
+          zones = zones.sort(function (a, b) {
316
+            return a.value > b.value
317
+          })
318
+          this.zones = zones
329
 
319
 
330
-          var dialysis_scheduals = [];
320
+          var dialysis_scheduals = []
331
           for (let index = 0; index < zones.length; index++) {
321
           for (let index = 0; index < zones.length; index++) {
332
-            const zone = zones[index];
333
-            var scheduals = schedualMap[zone.text];
322
+            const zone = zones[index]
323
+            var scheduals = schedualMap[zone.text]
334
             if (scheduals == null) {
324
             if (scheduals == null) {
335
-              continue;
325
+              continue
336
             }
326
             }
337
             dialysis_scheduals.push({
327
             dialysis_scheduals.push({
338
               zone_name: zone.text,
328
               zone_name: zone.text,
339
               scheduals: scheduals
329
               scheduals: scheduals
340
-            });
330
+            })
341
           }
331
           }
342
-          this.dialysis_scheduals = dialysis_scheduals;
332
+          this.dialysis_scheduals = dialysis_scheduals
343
           // console.log(this.dialysis_scheduals);
333
           // console.log(this.dialysis_scheduals);
344
         }
334
         }
345
-      });
335
+      })
346
     },
336
     },
347
-    parseTime(time, layout) {
348
-      return parseTime(time, layout);
337
+    parseTime (time, layout) {
338
+      return parseTime(time, layout)
349
     },
339
     },
350
-    openPicker: function() {
351
-      this.$refs.date_picker.open();
340
+    openPicker: function () {
341
+      this.$refs.date_picker.open()
352
     },
342
     },
353
-    handleDateConfirm: function(val) {
354
-      this.queryParams.date = this.parseTime(this.date / 1000, "{y}-{m}-{d}");
355
-      this.queryParams.partition = this.partition;
343
+    handleDateConfirm: function (val) {
344
+      this.queryParams.date = this.parseTime(this.date / 1000, '{y}-{m}-{d}')
345
+      this.queryParams.partition = this.partition
356
 
346
 
357
-      this.getMonitor(this.queryParams);
347
+      this.getMonitor(this.queryParams)
358
     },
348
     },
359
-    partitionName: function(val) {
349
+    partitionName: function (val) {
360
       for (let i = 0; i < this.partitionArr.length; i++) {
350
       for (let i = 0; i < this.partitionArr.length; i++) {
361
         if (this.partitionArr[i].id == val) {
351
         if (this.partitionArr[i].id == val) {
362
-          return this.partitionArr[i].name;
352
+          return this.partitionArr[i].name
363
         }
353
         }
364
       }
354
       }
365
     },
355
     },
366
-    GetAllZone: function() {
356
+    GetAllZone: function () {
367
       GetAllZone().then(response => {
357
       GetAllZone().then(response => {
368
         if (response.data.state == 0) {
358
         if (response.data.state == 0) {
369
-          return false;
359
+          return false
370
         } else {
360
         } else {
371
-          this.partitionArr = response.data.data.zone;
372
-          this.partitionArr.unshift({ id: 0, name: "全部分区" });
361
+          this.partitionArr = response.data.data.zone
362
+          this.partitionArr.unshift({ id: 0, name: '全部分区' })
373
         }
363
         }
374
-      });
364
+      })
375
     },
365
     },
376
-    itemClick: function(id) {
377
-      this.partition = id;
378
-      this.visible = false;
366
+    itemClick: function (id) {
367
+      this.partition = id
368
+      this.visible = false
379
 
369
 
380
-      this.queryParams.date = this.parseTime(this.date / 1000, "{y}-{m}-{d}");
381
-      this.queryParams.partition = this.partition;
382
-      this.getMonitor(this.queryParams);
370
+      this.queryParams.date = this.parseTime(this.date / 1000, '{y}-{m}-{d}')
371
+      this.queryParams.partition = this.partition
372
+      this.getMonitor(this.queryParams)
383
     },
373
     },
384
-    monitorBloodPressureStatus: function(val) {
385
-      let status = 0;
374
+    monitorBloodPressureStatus: function (val) {
375
+      let status = 0
386
       if (val.length == 0) {
376
       if (val.length == 0) {
387
-        return 0;
377
+        return 0
388
       }
378
       }
389
       for (let i = 0; i < val.length; i++) {
379
       for (let i = 0; i < val.length; i++) {
390
-        //舒张压(低压)(diastolic_blood_pressure)    收缩压(高压)(systolic_blood_pressure)
380
+        // 舒张压(低压)(diastolic_blood_pressure)    收缩压(高压)(systolic_blood_pressure)
391
         if (
381
         if (
392
           val[i].systolic_blood_pressure >= 140 ||
382
           val[i].systolic_blood_pressure >= 140 ||
393
           val[i].diastolic_blood_pressure >= 90
383
           val[i].diastolic_blood_pressure >= 90
394
         ) {
384
         ) {
395
-          status = 3; //高压
385
+          status = 3 // 高压
396
         } else if (
386
         } else if (
397
           val[i].diastolic_blood_pressure < 60 ||
387
           val[i].diastolic_blood_pressure < 60 ||
398
           val[i].systolic_blood_pressure < 90
388
           val[i].systolic_blood_pressure < 90
399
         ) {
389
         ) {
400
-          status = 1; //低压
390
+          status = 1 // 低压
401
         } else if (
391
         } else if (
402
           val[i].diastolic_blood_pressure >= 60 ||
392
           val[i].diastolic_blood_pressure >= 60 ||
403
           val[i].systolic_blood_pressure < 140
393
           val[i].systolic_blood_pressure < 140
404
         ) {
394
         ) {
405
-          status = 2; //正常
395
+          status = 2 // 正常
406
         }
396
         }
407
 
397
 
408
         // if ( val[i].diastolic_blood_pressure < 60 | val[i].systolic_blood_pressure < 90 ) {
398
         // if ( val[i].diastolic_blood_pressure < 60 | val[i].systolic_blood_pressure < 90 ) {
420
         // }
410
         // }
421
       }
411
       }
422
 
412
 
423
-      return status;
413
+      return status
424
     },
414
     },
425
-    monitorRateStatus: function(val) {
426
-      let status = 0;
415
+    monitorRateStatus: function (val) {
416
+      let status = 0
427
       if (val.length == 0) {
417
       if (val.length == 0) {
428
-        return 0;
418
+        return 0
429
       }
419
       }
430
       for (let i = 0; i < val.length; i++) {
420
       for (let i = 0; i < val.length; i++) {
431
-        //舒张压(低压)(diastolic_blood_pressure)    收缩压(高压)(systolic_blood_pressure)
421
+        // 舒张压(低压)(diastolic_blood_pressure)    收缩压(高压)(systolic_blood_pressure)
432
         if (val[i].pulse_frequency < 60) {
422
         if (val[i].pulse_frequency < 60) {
433
-          status = 1; //心率过缓
423
+          status = 1 // 心率过缓
434
         } else if (
424
         } else if (
435
           val[i].pulse_frequency >= 60 &&
425
           val[i].pulse_frequency >= 60 &&
436
           val[i].pulse_frequency < 100
426
           val[i].pulse_frequency < 100
437
         ) {
427
         ) {
438
-          status = 2; //心率正常
428
+          status = 2 // 心率正常
439
         } else if (val[i].pulse_frequency >= 100) {
429
         } else if (val[i].pulse_frequency >= 100) {
440
-          status = 3; //心率过快
430
+          status = 3 // 心率过快
441
         }
431
         }
442
       }
432
       }
443
-      return status;
433
+      return status
444
     },
434
     },
445
-    searchWithKeyword: function(page) {
446
-      this.$refs.search_field.blur();
435
+    searchWithKeyword: function (page) {
436
+      this.$refs.search_field.blur()
447
       if (this.patient_keyword.length == 0) {
437
       if (this.patient_keyword.length == 0) {
448
-        this.queryParams.date = this.parseTime(this.date / 1000, "{y}-{m}-{d}");
449
-        this.queryParams.partition = this.partition;
450
-        this.getMonitor(this.queryParams);
451
-        return;
438
+        this.queryParams.date = this.parseTime(this.date / 1000, '{y}-{m}-{d}')
439
+        this.queryParams.partition = this.partition
440
+        this.getMonitor(this.queryParams)
441
+        return
452
       }
442
       }
453
 
443
 
454
-      this.partition = 0;
444
+      this.partition = 0
455
 
445
 
456
-      this.search_page = page;
446
+      this.search_page = page
457
       if (page == 1) {
447
       if (page == 1) {
458
-        this.dialysis_scheduals = [];
448
+        this.dialysis_scheduals = []
459
       }
449
       }
460
-      this.loading = true;
461
-      this.finished = false;
450
+      this.loading = true
451
+      this.finished = false
462
       getPatientMonitors({
452
       getPatientMonitors({
463
         keyword: this.patient_keyword,
453
         keyword: this.patient_keyword,
464
         page: this.search_page
454
         page: this.search_page
465
       }).then(rs => {
455
       }).then(rs => {
466
-        this.loading = false;
467
-        this.finished = true;
468
-        var resp = rs.data;
456
+        this.loading = false
457
+        this.finished = true
458
+        var resp = rs.data
469
         if (resp.state == 1) {
459
         if (resp.state == 1) {
470
           if (resp.data.monitor.length > 0) {
460
           if (resp.data.monitor.length > 0) {
471
             this.dialysis_scheduals.push({
461
             this.dialysis_scheduals.push({
472
-              zone_name: "",
462
+              zone_name: '',
473
               scheduals: resp.data.monitor
463
               scheduals: resp.data.monitor
474
-            });
475
-            this.finished = false;
464
+            })
465
+            this.finished = false
476
           } else {
466
           } else {
477
-            this.finished = true;
467
+            this.finished = true
478
           }
468
           }
479
         }
469
         }
480
-      });
470
+      })
481
     },
471
     },
482
-    onLoad: function() {
483
-      this.searchWithKeyword(this.search_page + 1);
472
+    onLoad: function () {
473
+      this.searchWithKeyword(this.search_page + 1)
484
     }
474
     }
485
   },
475
   },
486
   components: {
476
   components: {
487
     Divider,
477
     Divider,
488
     SideBar
478
     SideBar
489
   }
479
   }
490
-};
480
+}
491
 </script>
481
 </script>
492
 
482
 
493
 <style lang="scss" scoped>
483
 <style lang="scss" scoped>