XMLWAN 4 years ago
parent
commit
5dd8e62b04

+ 2 - 2
src/xt_pages/device/group_main.vue View File

@@ -177,7 +177,7 @@ export default {
177 177
                 this.groups.push(newGroup);
178 178
                 this.cancelModifyGroup();
179 179
               } else {
180
-                this.$message.error(resp.msg);
180
+                this.$message.error("分组名称已存在!");
181 181
               }
182 182
             });
183 183
           } else {
@@ -193,7 +193,7 @@ export default {
193 193
                 }
194 194
                 this.cancelModifyGroup();
195 195
               } else {
196
-                this.$message.error(resp.msg);
196
+                this.$message.error("分组名称已存在!");
197 197
               }
198 198
             });
199 199
           }

+ 2 - 2
src/xt_pages/device/number_main.vue View File

@@ -237,7 +237,7 @@ export default {
237 237
                 this.device_numbers.push(newNumber);
238 238
                 this.cancelModifyDeviceNumber();
239 239
               } else {
240
-                this.$message.error(resp.msg);
240
+                this.$message.error("床位号/机号已存在!");
241 241
               }
242 242
             });
243 243
           } else {
@@ -267,7 +267,7 @@ export default {
267 267
                 }
268 268
                 this.cancelModifyDeviceNumber();
269 269
               } else {
270
-                this.$message.error(resp.msg);
270
+                this.$message.error("床位号/机号已存在!");
271 271
               }
272 272
             });
273 273
           }

+ 142 - 32
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -97,7 +97,7 @@
97 97
         v-show="showAdvicePanel"
98 98
         ref="advices_list"
99 99
         :row-class-name="tableRowClassName"
100
-        :span-method="mergeSpan"
100
+        :span-method="objectSpanMethod"
101 101
         @row-click="cellMouseEnter"
102 102
         :cell-class-name="adviceNameShow"
103 103
         :modal-append-to-body="false"
@@ -109,9 +109,7 @@
109 109
           min-width="26px"
110 110
         >
111 111
           <template slot-scope="scope">
112
-            <span v-if="isShowStartTime(scope.$index, scope.row)">{{
113
-              getXuserName(scope.row.advice_doctor)
114
-            }}</span>
112
+            <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
115 113
           </template>
116 114
         </el-table-column>
117 115
         <el-table-column
@@ -121,7 +119,7 @@
121 119
           min-width="35px"
122 120
         >
123 121
           <template slot-scope="scope">
124
-            <span v-if="isShowStartTime(scope.$index, scope.row)">{{
122
+            <span>{{
125 123
               scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}")
126 124
             }}</span>
127 125
           </template>
@@ -173,20 +171,12 @@
173 171
           </template>
174 172
         </el-table-column>
175 173
 
176
-        <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"-->
177
-        <!--v-else>-->
178
-        <!--<template slot-scope="scope">-->
179
-        <!--<span v-if="scope.row.parent_id == 0 " class="el-dropdown-link">{{getAdviceContent(scope.row,1)}}</span>-->
180
-        <!--<span v-if="scope.row.parent_id > 0 "-->
181
-        <!--class="el-dropdown-link">&emsp;{{getAdviceContent(scope.row,2)}}</span>-->
182
-        <!--</template>-->
183
-        <!--</el-table-column>-->
184
-
185 174
         <el-table-column
186 175
           prop="execution_time"
187 176
           align="center"
188 177
           min-width="30px"
189 178
           label="执行时间"
179
+          sortable
190 180
         >
191 181
           <template slot-scope="scope">
192 182
             <span v-if="scope.row.execution_time != 0">{{
@@ -658,6 +648,7 @@ export default {
658 648
             this.showAdviceForm = false;
659 649
             this.showAdvicePanel = true;
660 650
             var advice = response.data.data.advice;
651
+            // console.log("advice-------", advice);
661 652
             this.doctor_advices[this.currentIndex].drug_spec = advice.drug_spec;
662 653
             this.doctor_advices[this.currentIndex].drug_spec_unit =
663 654
               advice.drug_spec_unit;
@@ -1271,29 +1262,109 @@ export default {
1271 1262
         });
1272 1263
     },
1273 1264
     execAdvice() {
1274
-      if (this.currentRow == null) {
1275
-        this.$message.error("请先选择要执行的医嘱!");
1265
+      if (this.is_has_exce == false) {
1266
+        this.$message.error("你没有执行医嘱的权限");
1276 1267
         return false;
1277 1268
       }
1278 1269
 
1279
-      if (
1280
-        this.currentRow.stop_state == 1 ||
1281
-        this.currentRow.execution_state == 1
1282
-      ) {
1283
-        this.$message.error("所选医嘱已停止或执行");
1284
-        return false;
1285
-      }
1270
+      // if (this.currentAdvices.length <= 0) {
1271
+      //   return;
1272
+      //  }
1273
+      if (this.current_select_object == 1) {
1274
+        var isExecution = true;
1275
+        var adviceArr = this.advice_groups[this.current_group_index].advices;
1276
+        for (let i = 0; i < adviceArr.length; i++) {
1277
+          if (
1278
+            adviceArr[i].execution_state == 2 &&
1279
+            adviceArr[i].is_selected == 1
1280
+          ) {
1281
+            isExecution = false;
1282
+          }
1283
+        }
1284
+        console.log("a");
1285
+        if (isExecution) {
1286
+          this.$message.error("所选医嘱已停止或执行");
1287
+          return false;
1288
+        }
1289
+        console.log("b");
1290
+        for (let i = 0; i < adviceArr.length; i++) {
1291
+          if (
1292
+            adviceArr[i].is_selected == 1 &&
1293
+            adviceArr[i].checker > 0 &&
1294
+            adviceArr[i].checker == this.$store.getters.user.admin.id
1295
+          ) {
1296
+            this.$message.error("核对医嘱与执行不能是同一人");
1297
+            return false;
1298
+          }
1299
+        }
1300
+        var currentAdviceIdArr = [];
1301
+        for (let i = 0; i < adviceArr.length; i++) {
1302
+          if (adviceArr[i].is_selected == 1) {
1303
+            currentAdviceIdArr.push(adviceArr[i].id);
1304
+          }
1305
+        }
1306
+        console.log("c");
1307
+        this.currentAdviceIdsStr = currentAdviceIdArr.join(",");
1308
+        this.nowExecTime = new Date(adviceArr[0].start_time * 1000);
1309
+      } else {
1310
+        if (!(this.current_group_index >= 0 && this.current_advice_index < 0)) {
1311
+          return;
1312
+        }
1313
+        var isExecution = true;
1314
+        var group_top_advice = this.advice_groups[this.current_group_index]
1315
+          .advices[0];
1286 1316
 
1287
-      if (
1288
-        this.currentRow.checker > 0 &&
1289
-        this.currentRow.checker == this.$store.getters.xt_user.user.id
1290
-      ) {
1291
-        this.$message.error("核对与执行不能是同一人");
1292
-        return false;
1293
-      }
1317
+        var adviceArr = this.advice_groups[this.current_group_index].advices;
1318
+        for (let i = 0; i < adviceArr.length; i++) {
1319
+          if (
1320
+            adviceArr[i].is_selected == 1 &&
1321
+            adviceArr[i].execution_state == 2
1322
+          ) {
1323
+            isExecution = false;
1324
+          }
1325
+        }
1326
+        if (isExecution) {
1327
+          this.$message.error("所选医嘱已停止或执行");
1328
+          return false;
1329
+        }
1294 1330
 
1295
-      this.execTimeDialogVisible = true;
1296
-      this.deleLoading = true;
1331
+        for (let i = 0; i < adviceArr.length; i++) {
1332
+          if (
1333
+            adviceArr[i].is_selected == 1 &&
1334
+            adviceArr[i].checker > 0 &&
1335
+            adviceArr[i].checker == this.$store.getters.user.admin.id
1336
+          ) {
1337
+            this.$message.error("核对与执行不能是同一人");
1338
+            return false;
1339
+          }
1340
+        }
1341
+
1342
+        this.nowExecTime = new Date(group_top_advice.start_time * 1000);
1343
+      }
1344
+      this.$refs.exec_time.open();
1345
+      // if (this.currentRow == null) {
1346
+      //   this.$message.error("请先选择要执行的医嘱!");
1347
+      //   return false;
1348
+      // }
1349
+      //
1350
+      // if (
1351
+      //   this.currentRow.stop_state == 1 ||
1352
+      //   this.currentRow.execution_state == 1
1353
+      // ) {
1354
+      //   this.$message.error("所选医嘱已停止或执行");
1355
+      //   return false;
1356
+      // }
1357
+      //
1358
+      // if (
1359
+      //   this.currentRow.checker > 0 &&
1360
+      //   this.currentRow.checker == this.$store.getters.xt_user.user.id
1361
+      // ) {
1362
+      //   this.$message.error("核对与执行不能是同一人");
1363
+      //   return false;
1364
+      // }
1365
+      //
1366
+      // this.execTimeDialogVisible = true;
1367
+      // this.deleLoading = true;
1297 1368
     },
1298 1369
 
1299 1370
     DeleteGroupAdvice(groupno) {
@@ -1733,6 +1804,44 @@ export default {
1733 1804
             this.is_has_del_other = res.data.data.is_has_del_other;
1734 1805
           }
1735 1806
         });
1807
+    },
1808
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
1809
+      if (rowIndex % 2 === 0) {
1810
+        if (columnIndex === 0) {
1811
+          return [1, 2];
1812
+        } else if (columnIndex === 1) {
1813
+          return [0, 0];
1814
+        }
1815
+      }
1816
+    },
1817
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
1818
+      if (columnIndex === 0) {
1819
+        if (rowIndex % 2 === 0) {
1820
+          return {
1821
+            rowspan: 2,
1822
+            colspan: 1
1823
+          };
1824
+        } else {
1825
+          return {
1826
+            rowspan: 0,
1827
+            colspan: 0
1828
+          };
1829
+        }
1830
+      }
1831
+
1832
+      if (columnIndex === 1) {
1833
+        if (rowIndex % 2 === 0) {
1834
+          return {
1835
+            rowspan: 2,
1836
+            colspan: 1
1837
+          };
1838
+        } else {
1839
+          return {
1840
+            rowspan: 0,
1841
+            colspan: 0
1842
+          };
1843
+        }
1844
+      }
1736 1845
     }
1737 1846
   },
1738 1847
   created() {
@@ -1743,6 +1852,7 @@ export default {
1743 1852
     this.getAdviceConfig();
1744 1853
     this.unitsOption = getDataConfig("hemodialysis", "units");
1745 1854
     this.template_id = this.$store.getters.xt_user.template_info.template_id;
1855
+    console.log("医嘱----", this.doctor_advices);
1746 1856
   },
1747 1857
   components: {
1748 1858
     AddGroupAdvice,

File diff suppressed because it is too large
+ 1619 - 1263
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue


+ 273 - 167
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -9,9 +9,21 @@
9 9
     >
10 10
       <div v-show="edit == false">
11 11
         <div class="txsj">
12
-          <el-button round :disabled="!is_has_create" @click="newRecordAction">新增监测</el-button>
13
-          <el-button round :disabled="!is_has_modify && !is_has_modify_other" @click="modifyRecordAction">修改监测</el-button>
14
-          <el-button round :disabled="!is_has_del && !is_has_del_other" @click="deleteRecordAction">删除监测</el-button>
12
+          <el-button round :disabled="!is_has_create" @click="newRecordAction"
13
+            >新增监测</el-button
14
+          >
15
+          <el-button
16
+            round
17
+            :disabled="!is_has_modify && !is_has_modify_other"
18
+            @click="modifyRecordAction"
19
+            >修改监测</el-button
20
+          >
21
+          <el-button
22
+            round
23
+            :disabled="!is_has_del && !is_has_del_other"
24
+            @click="deleteRecordAction"
25
+            >删除监测</el-button
26
+          >
15 27
         </div>
16 28
         <el-table
17 29
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
@@ -140,7 +152,10 @@
140 152
             align="center"
141 153
             label="超滤量(ml)"
142 154
             width="110"
143
-            v-if="isShow('超滤量') && (template_id == 6 || template_id == 10 || template_id == 11)"
155
+            v-if="
156
+              isShow('超滤量') &&
157
+                (template_id == 6 || template_id == 10 || template_id == 11)
158
+            "
144 159
           >
145 160
             <template slot-scope="scope">
146 161
               {{
@@ -155,7 +170,12 @@
155 170
             align="center"
156 171
             label="超滤量(L)"
157 172
             width="110"
158
-            v-if="isShow('超滤量') && template_id != 6 &&  template_id != 10 && template_id != 11"
173
+            v-if="
174
+              isShow('超滤量') &&
175
+                template_id != 6 &&
176
+                template_id != 10 &&
177
+                template_id != 11
178
+            "
159 179
           >
160 180
             <template slot-scope="scope">
161 181
               {{
@@ -200,7 +220,10 @@
200 220
             align="center"
201 221
             label="置换率(ml/min)"
202 222
             width="120"
203
-            v-if="isShow('置换率') && (template_id == 6  || template_id == 10 || template_id == 11)"
223
+            v-if="
224
+              isShow('置换率') &&
225
+                (template_id == 6 || template_id == 10 || template_id == 11)
226
+            "
204 227
           >
205 228
             <template slot-scope="scope">
206 229
               {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
@@ -211,7 +234,12 @@
211 234
             align="center"
212 235
             label="置换率(L/h)"
213 236
             width="120"
214
-            v-if="isShow('置换率') && template_id != 6 && template_id != 10 && template_id != 11"
237
+            v-if="
238
+              isShow('置换率') &&
239
+                template_id != 6 &&
240
+                template_id != 10 &&
241
+                template_id != 11
242
+            "
215 243
           >
216 244
             <template slot-scope="scope">
217 245
               {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
@@ -222,7 +250,10 @@
222 250
             align="center"
223 251
             label="置换量(ml)"
224 252
             width="100"
225
-            v-if="isShow('置换量') && (template_id == 6 || template_id == 10 || template_id == 11)"
253
+            v-if="
254
+              isShow('置换量') &&
255
+                (template_id == 6 || template_id == 10 || template_id == 11)
256
+            "
226 257
           >
227 258
             <template slot-scope="scope">
228 259
               {{
@@ -238,13 +269,18 @@
238 269
             align="center"
239 270
             label="置换量(L)"
240 271
             width="100"
241
-            v-if="isShow('置换量') && template_id != 6 && template_id != 10 && template_id != 11"
272
+            v-if="
273
+              isShow('置换量') &&
274
+                template_id != 6 &&
275
+                template_id != 10 &&
276
+                template_id != 11
277
+            "
242 278
           >
243 279
             <template slot-scope="scope">
244 280
               {{
245
-              scope.row.displacement_quantity
246
-              ? scope.row.displacement_quantity
247
-              : ""
281
+                scope.row.displacement_quantity
282
+                  ? scope.row.displacement_quantity
283
+                  : ""
248 284
               }}
249 285
             </template>
250 286
           </el-table-column>
@@ -254,7 +290,12 @@
254 290
             align="center"
255 291
             label="SpO₂(%)"
256 292
             width="100"
257
-            v-if="isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11"
293
+            v-if="
294
+              isShow('SpO₂') &&
295
+                template_id != 6 &&
296
+                template_id != 10 &&
297
+                template_id != 11
298
+            "
258 299
           >
259 300
             <template slot-scope="scope">
260 301
               {{
@@ -265,7 +306,6 @@
265 306
             </template>
266 307
           </el-table-column>
267 308
 
268
-
269 309
           <el-table-column
270 310
             prop="displacement_flow_quantity"
271 311
             align="center"
@@ -381,7 +421,7 @@
381 421
               <el-button
382 422
                 size="mini"
383 423
                 type="primary"
384
-                @click="venousPressureChange(1)"
424
+                @click="venousPressureChangeOne"
385 425
                 >转换</el-button
386 426
               >
387 427
             </el-form-item>
@@ -395,7 +435,7 @@
395 435
               <el-button
396 436
                 size="mini"
397 437
                 type="primary"
398
-                @click="venousPressureChange(3)"
438
+                @click="venousPressureChangeThree"
399 439
                 >转换</el-button
400 440
               >
401 441
             </el-form-item>
@@ -416,7 +456,7 @@
416 456
               <el-button
417 457
                 size="mini"
418 458
                 type="primary"
419
-                @click="venousPressureChange(2)"
459
+                @click="venousPressureChangeTwo"
420 460
                 >转换</el-button
421 461
               >
422 462
             </el-form-item>
@@ -427,12 +467,26 @@
427 467
               <el-input v-model="form.ultrafiltration_rate"></el-input>
428 468
             </el-form-item>
429 469
           </el-col>
430
-          <el-col :span="8" v-if="isShow('超滤量') &&(template_id != 6 || template_id != 10 || template_id != 11)">
470
+          <el-col
471
+            :span="8"
472
+            v-if="
473
+              isShow('超滤量') &&
474
+                (template_id != 6 || template_id != 10 || template_id != 11)
475
+            "
476
+          >
431 477
             <el-form-item label="超滤量(ml):">
432 478
               <el-input v-model="form.ultrafiltration_volume"></el-input>
433 479
             </el-form-item>
434 480
           </el-col>
435
-          <el-col :span="8" v-if="isShow('超滤量') && template_id != 6 && template_id != 10 && template_id != 11">
481
+          <el-col
482
+            :span="8"
483
+            v-if="
484
+              isShow('超滤量') &&
485
+                template_id != 6 &&
486
+                template_id != 10 &&
487
+                template_id != 11
488
+            "
489
+          >
436 490
             <el-form-item label="超滤量(L):">
437 491
               <el-input v-model="form.ultrafiltration_volume"></el-input>
438 492
             </el-form-item>
@@ -479,7 +533,6 @@
479 533
             </el-form-item>
480 534
           </el-col>
481 535
 
482
-
483 536
           <el-col :span="8" v-if="isShow('肝素用量余量')">
484 537
             <el-form-item label="肝素用量余量(ml):">
485 538
               <el-input v-model="form.heparin"></el-input>
@@ -615,21 +668,21 @@ import {
615 668
 } from "@/api/dialysis_record";
616 669
 import store from "@/store";
617 670
 
618
-import request from '@/utils/request'
671
+import request from "@/utils/request";
619 672
 
620 673
 export default {
621 674
   name: "MonitorDialog",
622 675
   data() {
623 676
     return {
624
-      is_has_create:true,
625
-      is_has_modify:true,
626
-      is_has_modify_other:true,
627
-      is_has_del:true,
628
-      is_has_del_other:true,
677
+      is_has_create: true,
678
+      is_has_modify: true,
679
+      is_has_modify_other: true,
680
+      is_has_del: true,
681
+      is_has_del_other: true,
629 682
       visible: false,
630 683
       edit: false,
631 684
       current_row_class: "current-box-class",
632
-      creator:0,
685
+      creator: 0,
633 686
       patient_id: 0,
634 687
       schedule_date: 0,
635 688
       template_id: 0,
@@ -659,7 +712,7 @@ export default {
659 712
         displacement_quantity: "", // 置换量
660 713
         conductivity: "", // 电导度
661 714
         displacement_flow_quantity: "", // 置换液流量
662
-        heparin:"", //肝素用量余量
715
+        heparin: "", //肝素用量余量
663 716
         ktv: "", // KT/V
664 717
         symptom: "", // 病情变化
665 718
         dispose: "", // 处理
@@ -674,7 +727,10 @@ export default {
674 727
       dispose_selecteds: [],
675 728
       dispose_options: getDataConfig("hemodialysis", "deals"),
676 729
       result_selecteds: [],
677
-      result_options: getDataConfig("hemodialysis", "results")
730
+      result_options: getDataConfig("hemodialysis", "results"),
731
+      valueOne: 0,
732
+      valueTwo: 0,
733
+      valueThree: 0
678 734
     };
679 735
   },
680 736
   props: {
@@ -714,6 +770,56 @@ export default {
714 770
         );
715 771
       }
716 772
     },
773
+    venousPressureChangeOne() {
774
+      if (this.valueOne == 0) {
775
+        this.form.venous_pressure = Math.ceil(
776
+          Math.round(this.form.venous_pressure * 7.5)
777
+        );
778
+        this.valueOne = 1;
779
+        return false;
780
+      }
781
+      if (this.valueOne == 1) {
782
+        this.form.venous_pressure = Math.ceil(
783
+          Math.round(this.form.venous_pressure / 7.5)
784
+        );
785
+        this.valueOne = 0;
786
+        return false;
787
+      }
788
+    },
789
+    venousPressureChangeThree() {
790
+      if (this.valueThree == 0) {
791
+        this.form.arterial_pressure = Math.ceil(
792
+          Math.round(this.form.arterial_pressure * 7.5)
793
+        );
794
+        this.valueThree = 1;
795
+        return false;
796
+      }
797
+      if (this.valueThree == 1) {
798
+        this.form.arterial_pressure = Math.ceil(
799
+          Math.round(this.form.arterial_pressure / 7.5)
800
+        );
801
+        this.valueThree = 0;
802
+        return false;
803
+      }
804
+    },
805
+
806
+    venousPressureChangeTwo() {
807
+      if (this.valueTwo == 0) {
808
+        this.form.transmembrane_pressure = Math.ceil(
809
+          Math.round(this.form.transmembrane_pressure * 7.5)
810
+        );
811
+        this.valueTwo = 1;
812
+        return false;
813
+      }
814
+      if (this.valueTwo == 1) {
815
+        this.form.transmembrane_pressure = Math.ceil(
816
+          Math.round(this.form.transmembrane_pressure / 7.5)
817
+        );
818
+        this.valueTwo = 0;
819
+        return false;
820
+      }
821
+    },
822
+
717 823
     isShow(name) {
718 824
       var filedList = store.getters.xt_user.fileds;
719 825
       for (let i = 0; i < filedList.length; i++) {
@@ -731,7 +837,7 @@ export default {
731 837
       this.cancelEditAction();
732 838
     },
733 839
     show() {
734
-      this.getPermission()
840
+      this.getPermission();
735 841
       this.visible = true;
736 842
     },
737 843
     hide() {
@@ -788,9 +894,7 @@ export default {
788 894
         this.form.replacement_rate = resp.monitor.replacement_rate
789 895
           ? resp.monitor.replacement_rate
790 896
           : "";
791
-        this.form.heparin = resp.monitor.heparin
792
-          ? resp.monitor.heparin
793
-          : "";
897
+        this.form.heparin = resp.monitor.heparin ? resp.monitor.heparin : "";
794 898
         this.form.displacement_quantity = ""; // this.last_monitor_record.displacement_quantity;
795 899
         this.form.conductivity = "";
796 900
         this.form.displacement_flow_quantity = "";
@@ -807,10 +911,10 @@ export default {
807 911
         this.$message.error("请选择一条监测记录");
808 912
         return;
809 913
       }
810
-      this.creator = this.table_current_row.creator
811
-      console.log( this.table_current_row)
812
-      console.log( this.table_current_row.creator)
813
-      console.log(this.creator)
914
+      this.creator = this.table_current_row.creator;
915
+      console.log(this.table_current_row);
916
+      console.log(this.table_current_row.creator);
917
+      console.log(this.creator);
814 918
       this.setEditMonitor(this.table_current_row);
815 919
       this.$refs.table.setCurrentRow(null);
816 920
       this.edit = true;
@@ -913,11 +1017,7 @@ export default {
913 1017
           ? monitor.displacement_flow_quantity
914 1018
           : "";
915 1019
 
916
-        this.form.heparin = monitor.heparin
917
-          ? monitor.heparin
918
-          : "";
919
-
920
-
1020
+        this.form.heparin = monitor.heparin ? monitor.heparin : "";
921 1021
 
922 1022
         this.form.ktv = monitor.ktv;
923 1023
         this.form.symptom = monitor.symptom;
@@ -1004,7 +1104,6 @@ export default {
1004 1104
           ? 0
1005 1105
           : parseFloat(this.form.displacement_flow_quantity);
1006 1106
 
1007
-
1008 1107
       this.form.heparin =
1009 1108
         parseFloat(this.form.heparin) == NaN
1010 1109
           ? 0
@@ -1014,116 +1113,119 @@ export default {
1014 1113
         parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
1015 1114
       this.form.monitoring_date = parseInt(this.form.monitoring_date);
1016 1115
 
1017
-
1018
-      let mode = "1"
1019
-       if(this.form.id > 0){
1020
-         mode = "2"
1021
-         if(this.creator > 0 && this.creator!= this.$store.getters.xt_user.user.id){
1022
-          mode = "3"
1023
-         }
1116
+      let mode = "1";
1117
+      if (this.form.id > 0) {
1118
+        mode = "2";
1119
+        if (
1120
+          this.creator > 0 &&
1121
+          this.creator != this.$store.getters.xt_user.user.id
1122
+        ) {
1123
+          mode = "3";
1124
+        }
1024 1125
       }
1025
-      editMonitor(this.patient_id, this.schedule_date, this.form,mode).then(rs => {
1026
-        var resp = rs.data;
1027
-        if (resp.state == 1) {
1028
-          var monitor = resp.data.monitor;
1029
-          if (this.isAdd) {
1030
-            this.monitors.unshift(monitor);
1031
-            this.monitors.sort((a, b) => b.operate_time - a.operate_time);
1032
-            this.monitors.reverse();
1033
-          } else {
1034
-            for (let index = 0; index < this.monitors.length; index++) {
1035
-              const m = this.monitors[index];
1036
-              if (m.id == monitor.id) {
1037
-                for (const key in monitor) {
1038
-                  m[key] = monitor[key];
1126
+      editMonitor(this.patient_id, this.schedule_date, this.form, mode).then(
1127
+        rs => {
1128
+          var resp = rs.data;
1129
+          if (resp.state == 1) {
1130
+            var monitor = resp.data.monitor;
1131
+            if (this.isAdd) {
1132
+              this.monitors.unshift(monitor);
1133
+              this.monitors.sort((a, b) => b.operate_time - a.operate_time);
1134
+              this.monitors.reverse();
1135
+            } else {
1136
+              for (let index = 0; index < this.monitors.length; index++) {
1137
+                const m = this.monitors[index];
1138
+                if (m.id == monitor.id) {
1139
+                  for (const key in monitor) {
1140
+                    m[key] = monitor[key];
1141
+                  }
1142
+                  break;
1039 1143
                 }
1040
-                break;
1041 1144
               }
1042 1145
             }
1146
+            this.reset();
1147
+          } else {
1148
+            this.form.systolic_bp =
1149
+              parseFloat(this.form.systolic_bp) == NaN
1150
+                ? 0
1151
+                : parseFloat(this.form.systolic_bp);
1152
+            this.form.diastolic_bp =
1153
+              parseFloat(this.form.diastolic_bp) == NaN
1154
+                ? 0
1155
+                : parseFloat(this.form.diastolic_bp);
1156
+            this.form.temperature =
1157
+              parseFloat(this.form.temperature) == NaN
1158
+                ? 0
1159
+                : parseFloat(this.form.temperature);
1160
+            this.form.pulse_frequency =
1161
+              parseFloat(this.form.pulse_frequency) == NaN
1162
+                ? 0
1163
+                : parseFloat(this.form.pulse_frequency);
1164
+            this.form.breathing_rated =
1165
+              parseFloat(this.form.breathing_rated) == NaN
1166
+                ? 0
1167
+                : parseFloat(this.form.breathing_rated);
1168
+            this.form.blood_flow_volume =
1169
+              parseFloat(this.form.blood_flow_volume) == NaN
1170
+                ? 0
1171
+                : parseFloat(this.form.blood_flow_volume);
1172
+            this.form.venous_pressure =
1173
+              parseFloat(this.form.venous_pressure) == NaN
1174
+                ? 0
1175
+                : parseFloat(this.form.venous_pressure);
1176
+            this.form.transmembrane_pressure =
1177
+              parseFloat(this.form.transmembrane_pressure) == NaN
1178
+                ? 0
1179
+                : parseFloat(this.form.transmembrane_pressure);
1180
+            this.form.ultrafiltration_volume =
1181
+              parseFloat(this.form.ultrafiltration_volume) == NaN
1182
+                ? 0
1183
+                : parseFloat(this.form.ultrafiltration_volume);
1184
+            this.form.ultrafiltration_rate =
1185
+              parseFloat(this.form.ultrafiltration_rate) == NaN
1186
+                ? 0
1187
+                : parseFloat(this.form.ultrafiltration_rate);
1188
+            this.form.arterial_pressure =
1189
+              parseFloat(this.form.arterial_pressure) == NaN
1190
+                ? 0
1191
+                : parseFloat(this.form.arterial_pressure);
1192
+            this.form.sodium_concentration =
1193
+              parseFloat(this.form.sodium_concentration) == NaN
1194
+                ? 0
1195
+                : parseFloat(this.form.sodium_concentration);
1196
+            this.form.dialysate_temperature =
1197
+              parseFloat(this.form.dialysate_temperature) == NaN
1198
+                ? 0
1199
+                : parseFloat(this.form.dialysate_temperature);
1200
+            this.form.replacement_rate =
1201
+              parseFloat(this.form.replacement_rate) == NaN
1202
+                ? 0
1203
+                : parseFloat(this.form.replacement_rate);
1204
+            this.form.displacement_quantity =
1205
+              parseFloat(this.form.displacement_quantity) == NaN
1206
+                ? 0
1207
+                : parseFloat(this.form.displacement_quantity);
1208
+            this.form.conductivity =
1209
+              parseFloat(this.form.conductivity) == NaN
1210
+                ? 0
1211
+                : parseFloat(this.form.conductivity);
1212
+            this.form.displacement_flow_quantity =
1213
+              parseFloat(this.form.displacement_flow_quantity) == NaN
1214
+                ? 0
1215
+                : parseFloat(this.form.displacement_flow_quantity);
1216
+
1217
+            this.form.heparin =
1218
+              parseFloat(this.form.heparin) == NaN
1219
+                ? 0
1220
+                : parseFloat(this.form.heparin);
1221
+
1222
+            this.form.ktv =
1223
+              parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
1224
+
1225
+            this.$message.error(resp.msg);
1043 1226
           }
1044
-          this.reset();
1045
-        } else {
1046
-          this.form.systolic_bp =
1047
-            parseFloat(this.form.systolic_bp) == NaN
1048
-              ? 0
1049
-              : parseFloat(this.form.systolic_bp);
1050
-          this.form.diastolic_bp =
1051
-            parseFloat(this.form.diastolic_bp) == NaN
1052
-              ? 0
1053
-              : parseFloat(this.form.diastolic_bp);
1054
-          this.form.temperature =
1055
-            parseFloat(this.form.temperature) == NaN
1056
-              ? 0
1057
-              : parseFloat(this.form.temperature);
1058
-          this.form.pulse_frequency =
1059
-            parseFloat(this.form.pulse_frequency) == NaN
1060
-              ? 0
1061
-              : parseFloat(this.form.pulse_frequency);
1062
-          this.form.breathing_rated =
1063
-            parseFloat(this.form.breathing_rated) == NaN
1064
-              ? 0
1065
-              : parseFloat(this.form.breathing_rated);
1066
-          this.form.blood_flow_volume =
1067
-            parseFloat(this.form.blood_flow_volume) == NaN
1068
-              ? 0
1069
-              : parseFloat(this.form.blood_flow_volume);
1070
-          this.form.venous_pressure =
1071
-            parseFloat(this.form.venous_pressure) == NaN
1072
-              ? 0
1073
-              : parseFloat(this.form.venous_pressure);
1074
-          this.form.transmembrane_pressure =
1075
-            parseFloat(this.form.transmembrane_pressure) == NaN
1076
-              ? 0
1077
-              : parseFloat(this.form.transmembrane_pressure);
1078
-          this.form.ultrafiltration_volume =
1079
-            parseFloat(this.form.ultrafiltration_volume) == NaN
1080
-              ? 0
1081
-              : parseFloat(this.form.ultrafiltration_volume);
1082
-          this.form.ultrafiltration_rate =
1083
-            parseFloat(this.form.ultrafiltration_rate) == NaN
1084
-              ? 0
1085
-              : parseFloat(this.form.ultrafiltration_rate);
1086
-          this.form.arterial_pressure =
1087
-            parseFloat(this.form.arterial_pressure) == NaN
1088
-              ? 0
1089
-              : parseFloat(this.form.arterial_pressure);
1090
-          this.form.sodium_concentration =
1091
-            parseFloat(this.form.sodium_concentration) == NaN
1092
-              ? 0
1093
-              : parseFloat(this.form.sodium_concentration);
1094
-          this.form.dialysate_temperature =
1095
-            parseFloat(this.form.dialysate_temperature) == NaN
1096
-              ? 0
1097
-              : parseFloat(this.form.dialysate_temperature);
1098
-          this.form.replacement_rate =
1099
-            parseFloat(this.form.replacement_rate) == NaN
1100
-              ? 0
1101
-              : parseFloat(this.form.replacement_rate);
1102
-          this.form.displacement_quantity =
1103
-            parseFloat(this.form.displacement_quantity) == NaN
1104
-              ? 0
1105
-              : parseFloat(this.form.displacement_quantity);
1106
-          this.form.conductivity =
1107
-            parseFloat(this.form.conductivity) == NaN
1108
-              ? 0
1109
-              : parseFloat(this.form.conductivity);
1110
-          this.form.displacement_flow_quantity =
1111
-            parseFloat(this.form.displacement_flow_quantity) == NaN
1112
-              ? 0
1113
-              : parseFloat(this.form.displacement_flow_quantity);
1114
-
1115
-          this.form.heparin =
1116
-            parseFloat(this.form.heparin) == NaN
1117
-              ? 0
1118
-              : parseFloat(this.form.heparin);
1119
-
1120
-          this.form.ktv =
1121
-            parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
1122
-
1123
-
1124
-          this.$message.error(resp.msg);
1125 1227
         }
1126
-      });
1228
+      );
1127 1229
     },
1128 1230
 
1129 1231
     symptomTextareaBlur: function() {
@@ -1183,16 +1285,19 @@ export default {
1183 1285
         type: "warning"
1184 1286
       })
1185 1287
         .then(() => {
1186
-          let mode = "4"
1187
-          if(this.table_current_row.creator > 0 && this.table_current_row.creator != this.$store.getters.xt_user.user.id){
1188
-            mode = "5"
1288
+          let mode = "4";
1289
+          if (
1290
+            this.table_current_row.creator > 0 &&
1291
+            this.table_current_row.creator !=
1292
+              this.$store.getters.xt_user.user.id
1293
+          ) {
1294
+            mode = "5";
1189 1295
           }
1190 1296
 
1191 1297
           const params = {
1192 1298
             patient_id: this.patient_id,
1193 1299
             record_id: this.table_current_row.id,
1194 1300
             mode: mode
1195
-
1196 1301
           };
1197 1302
 
1198 1303
           postDelMonitorInfo(params).then(response => {
@@ -1207,14 +1312,14 @@ export default {
1207 1312
                 }
1208 1313
               }
1209 1314
               this.$message.success("删除成功");
1210
-
1211 1315
             }
1212 1316
           });
1213 1317
         })
1214 1318
         .catch(() => {});
1215 1319
     },
1216 1320
     getPermission() {
1217
-        request.get("/api/func_per/get", {
1321
+      request
1322
+        .get("/api/func_per/get", {
1218 1323
           params: {
1219 1324
             create_url: "/api/dislysis/monitor/edit?mode=1",
1220 1325
             modify_url: "/api/dislysis/monitor/edit?mode=2",
@@ -1223,22 +1328,23 @@ export default {
1223 1328
             del_other_url: "/api/dialysis/monitor/del?mode=5",
1224 1329
             module: 7
1225 1330
           }
1226
-        }).then(res => {
1227
-          console.log(res)
1331
+        })
1332
+        .then(res => {
1333
+          console.log(res);
1228 1334
           if (res.data.state == 0) {
1229
-            this.hasPermission = false
1335
+            this.hasPermission = false;
1230 1336
           } else if (res.data.state == 1) {
1231
-            this.is_has_create = res.data.data.is_has_create
1232
-            this.is_has_exce = res.data.data.is_has_exce
1233
-            this.is_has_check = res.data.data.is_has_check
1234
-            this.is_has_modify = res.data.data.is_has_modify
1235
-            this.is_has_modify_other = res.data.data.is_has_modify_other
1236
-            this.is_has_modify_exce = res.data.data.is_has_modify_exce
1237
-            this.is_has_del = res.data.data.is_has_del
1238
-            this.is_has_del_other = res.data.data.is_has_del_other
1337
+            this.is_has_create = res.data.data.is_has_create;
1338
+            this.is_has_exce = res.data.data.is_has_exce;
1339
+            this.is_has_check = res.data.data.is_has_check;
1340
+            this.is_has_modify = res.data.data.is_has_modify;
1341
+            this.is_has_modify_other = res.data.data.is_has_modify_other;
1342
+            this.is_has_modify_exce = res.data.data.is_has_modify_exce;
1343
+            this.is_has_del = res.data.data.is_has_del;
1344
+            this.is_has_del_other = res.data.data.is_has_del_other;
1239 1345
           }
1240
-        })
1241
-      }
1346
+        });
1347
+    }
1242 1348
   }
1243 1349
 };
1244 1350
 </script>
@@ -1296,7 +1402,7 @@ export default {
1296 1402
 .el-table__body-wrapper::-webkit-scrollbar {
1297 1403
   height: 20px;
1298 1404
 }
1299
-.dialog_box .current-box-class .current-row{
1405
+.dialog_box .current-box-class .current-row {
1300 1406
   background: #87ceff;
1301 1407
 }
1302 1408
 .dialog_box tr:hover > td {

File diff suppressed because it is too large
+ 1551 - 1558
src/xt_pages/user/components/EditGroupAdvice.vue


File diff suppressed because it is too large
+ 1290 - 748
src/xt_pages/user/components/PatientDetail.vue


+ 22 - 3
src/xt_pages/user/components/PatientSidebar.vue View File

@@ -46,8 +46,9 @@
46 46
         >姓名:{{ currentPatient.name }} &nbsp;&nbsp; 性别:{{
47 47
           tranSex(currentPatient.gender)
48 48
         }}
49
-        &nbsp;&nbsp; 年龄:{{ tranAge(currentPatient.birthday) }} &nbsp;&nbsp;
50
-        透析号:{{ currentPatient.dialysis_no }}
49
+        &nbsp;&nbsp; 年龄:{{ getAge(currentPatient) }} &nbsp;&nbsp; 透析号:{{
50
+          currentPatient.dialysis_no
51
+        }}
51 52
       </span>
52 53
     </div>
53 54
   </div>
@@ -182,7 +183,7 @@ export default {
182 183
             for (let index = 0; index < len; index++) {
183 184
               if (this.patientsList[index].id == this.id) {
184 185
                 this.currentPatient = this.patientsList[index];
185
-
186
+                //console.log("curr", this.currentPatient);
186 187
                 this.selectID = this.patientsList[index].id;
187 188
                 this.$emit("tran-patient", this.currentPatient);
188 189
                 break;
@@ -228,6 +229,24 @@ export default {
228 229
     },
229 230
     handleSelect(val) {
230 231
       this.$router.push("/patients/patient/" + val.id);
232
+    },
233
+    getAge: function(val) {
234
+      var thisLen = val.id_card_no.length;
235
+      var birth = "";
236
+      if (thisLen == 15) {
237
+        birth = "19" + val.id_card_no.substr(6, 6);
238
+      } else {
239
+        birth = val.id_card_no.substr(6, 8);
240
+      }
241
+      var birthtwo =
242
+        birth.substr(0, 4) +
243
+        "-" +
244
+        birth.substr(4, 2) +
245
+        "-" +
246
+        birth.substr(6, 2);
247
+
248
+      var age = jsGetAge(birthtwo, "-");
249
+      return age;
231 250
     }
232 251
   },
233 252
   created() {

+ 22 - 3
src/xt_pages/user/doctorAdvice.vue View File

@@ -170,10 +170,9 @@
170 170
           align="center"
171 171
         >
172 172
           <template slot-scope="scope">
173
-            <span v-if="isShowStartTime(scope.$index, scope.row)">{{
173
+            <span>{{
174 174
               scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}")
175 175
             }}</span>
176
-            <span v-else></span>
177 176
           </template>
178 177
         </el-table-column>
179 178
 
@@ -512,6 +511,17 @@
512 511
         </el-table-column>
513 512
       </el-table>
514 513
 
514
+      <el-pagination
515
+        @size-change="handleSizeChange"
516
+        @current-change="handleCurrentChange"
517
+        :page-sizes="[10, 20, 50, 100]"
518
+        :page-size="10"
519
+        background
520
+        style="margin-top:20px;float: right"
521
+        layout="total, sizes, prev, pager, next, jumper"
522
+        :total="total"
523
+      ></el-pagination>
524
+
515 525
       <el-dialog
516 526
         title="新增医嘱"
517 527
         :visible.sync="groupFormVisible"
@@ -2119,6 +2129,7 @@ export default {
2119 2129
         limit: 10,
2120 2130
         page: 1
2121 2131
       },
2132
+      total: 0,
2122 2133
       addLoading: false,
2123 2134
       lstableData: [],
2124 2135
       cqtableData: [],
@@ -3317,7 +3328,7 @@ export default {
3317 3328
           this.doctorAdvice = arr;
3318 3329
           var total = response.data.data.total;
3319 3330
           console.log("total", total);
3320
-
3331
+          this.total = total;
3321 3332
           this.operators = response.data.data.operators;
3322 3333
           if (this.operators.length > 0) {
3323 3334
             var operatorsLen = this.operators.length;
@@ -4286,6 +4297,14 @@ export default {
4286 4297
         this.$message.error("该病人未排班,不能开临时医嘱!");
4287 4298
         this.groupFormVisible = false;
4288 4299
       }
4300
+    },
4301
+    handleCurrentChange(page) {
4302
+      this.listQuery.page = page;
4303
+      this.getList();
4304
+    },
4305
+    handleSizeChange(limit) {
4306
+      this.listQuery.limit = limit;
4307
+      this.getList();
4289 4308
     }
4290 4309
   },
4291 4310
   watch: {

+ 20 - 24
src/xt_pages/user/patients.vue View File

@@ -264,13 +264,9 @@
264 264
             <span v-else>未知</span>
265 265
           </template>
266 266
         </el-table-column>
267
-        <el-table-column
268
-          label="透析次数"
269
-          min-width="94"
270
-          align="center"
271
-        >
272
-          <template slot-scope="scope" >
273
-            <span>{{getCount(scope.row)}}</span>
267
+        <el-table-column label="透析次数" min-width="94" align="center">
268
+          <template slot-scope="scope">
269
+            <span>{{ getCount(scope.row) }}</span>
274 270
           </template>
275 271
         </el-table-column>
276 272
         <!-- <el-table-column min-width="150" label="二维码" align="center">
@@ -576,9 +572,9 @@ export default {
576 572
   },
577 573
 
578 574
   methods: {
579
-    getCount(row){
580
-      console.log(row)
581
-      return row.total_dialysis + row.user_sys_before_count
575
+    getCount(row) {
576
+      console.log(row);
577
+      return row.total_dialysis + row.user_sys_before_count;
582 578
     },
583 579
     EditLapseto() {
584 580
       if (this.lapsetoForm.lapseto_time == "") {
@@ -769,22 +765,22 @@ export default {
769 765
       var dialysisno = this.dialysis_no;
770 766
 
771 767
       // Base64位加密
772
-      var aid = this.Base64.encode(id);
773
-      var aname = this.Base64.encode(name);
774
-      var agender = this.Base64.encode(gender);
775
-      var aidcardno = this.Base64.encode(idcardno);
776
-      var aphone = this.Base64.encode(phone);
777
-      var ahealthcareno = this.Base64.encode(healthcareno);
778
-      var adialysisno = this.Base64.encode(dialysisno);
768
+      // var aid = this.Base64.encode(id);
769
+      // var aname = this.Base64.encode(name);
770
+      //  var agender = this.Base64.encode(gender);
771
+      //  var aidcardno = this.Base64.encode(idcardno);
772
+      // var aphone = this.Base64.encode(phone);
773
+      // var ahealthcareno = this.Base64.encode(healthcareno);
774
+      // var adialysisno = this.Base64.encode(dialysisno);
779 775
       // 调用生成二维码的方法
780 776
       this.$options.methods.qrcode(
781
-        aid,
782
-        aname,
783
-        agender,
784
-        aidcardno,
785
-        aphone,
786
-        ahealthcareno,
787
-        adialysisno
777
+        id,
778
+        name,
779
+        gender,
780
+        idcardno,
781
+        phone,
782
+        healthcareno,
783
+        dialysisno
788 784
       );
789 785
     },
790 786
     qrcode(id, name, gender, idcardno, phone, healthcareno, dialysisno) {