See999 3 years ago
parent
commit
f384790785
1 changed files with 129 additions and 147 deletions
  1. 129 147
      src/xt_pages/dialysis/details/index.vue

+ 129 - 147
src/xt_pages/dialysis/details/index.vue View File

@@ -595,52 +595,52 @@ export default {
595 595
       headNurses: [],
596 596
       lastDialysisPrescribe: { id: 0 },
597 597
       //
598
-      activeName:'first',
598
+      activeName: 'first',
599 599
       selected_date: new Date(),
600 600
       // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
601 601
       search_keyword: '', // 确定用于搜索的关键字
602 602
       search_input: '', // 输入中的关键字
603
-      patient_state:[
604
-        {value: 0,label: '全部'},
605
-        {value: 1,label: '已签到'},
606
-        {value: 2,label: '未签到'},
607
-        {value: 3,label: '已上机'},
608
-        {value: 4,label: '已下机'},
603
+      patient_state: [
604
+        { value: 0, label: '全部' },
605
+        { value: 1, label: '已签到' },
606
+        { value: 2, label: '未签到' },
607
+        { value: 3, label: '已上机' },
608
+        { value: 4, label: '已下机' }
609 609
       ],
610 610
       patientStateVal: 0,
611
-      treat_state:[
612
-        {value: 0,label: '全部'},
613
-        {value: 1,label: '待开处方'},
614
-        {value: 2,label: '待开小结'},
611
+      treat_state: [
612
+        { value: 0, label: '全部' },
613
+        { value: 1, label: '待开处方' },
614
+        { value: 2, label: '待开小结' }
615 615
       ],
616 616
       treatStateVal: 0,
617
-      schedule_options:[
618
-        {value: 0,label: '全部'},
619
-        {value: 1,label: '上午'},
620
-        {value: 2,label: '下午'},
621
-        {value: 3,label: '晚上'},
617
+      schedule_options: [
618
+        { value: 0, label: '全部' },
619
+        { value: 1, label: '上午' },
620
+        { value: 2, label: '下午' },
621
+        { value: 3, label: '晚上' }
622 622
       ],
623 623
       scheduleStateVal: 0,
624
-      zone_options:[
624
+      zone_options: [
625 625
         { id: 0, text: '全部' }
626 626
       ],
627
-      zoneVal:0,
627
+      zoneVal: 0,
628 628
       tableData: [],
629
-      tableData1:[],
630
-      arr:[],
631
-      newName:'',
632
-      newTime:''
629
+      tableData1: [],
630
+      arr: [],
631
+      newName: '',
632
+      newTime: ''
633 633
     }
634 634
   },
635 635
   created() {
636
-    var patient_id = this.$route.query.patient_id;
637
-    var date = this.$route.query.date;
638
-    this.patient_id = patient_id;
639
-    this.date = date;
640
-    
641
-    this.getScheduleDetail();
642
-    this.getLongAdvice();
643
-    
636
+    var patient_id = this.$route.query.patient_id
637
+    var date = this.$route.query.date
638
+    this.patient_id = patient_id
639
+    this.date = date
640
+
641
+    this.getScheduleDetail()
642
+    this.getLongAdvice()
643
+
644 644
     this.selected_date = this.$route.query.date * 1000
645 645
     var schedule_type_selected = this.$store.getters.schedule_type_selected
646 646
     var zone_selected = this.$store.getters.zone_selected
@@ -659,26 +659,21 @@ export default {
659 659
     if (treat_state_selected) {
660 660
       this.treatStateVal = treat_state_selected.treat_state_selected
661 661
     }
662
-    if(selected_date.selected_date){
662
+    if (selected_date.selected_date) {
663 663
       this.selected_date = selected_date.selected_date
664
-      
665 664
     }
666 665
 
667
-    this.getInitData();
668
-    
669
-    
670
-    
666
+    this.getInitData()
671 667
   },
672
-  mounted(){
673
-    const timer = setInterval(() =>{
674
-      // this.getInitData();      
675
-      this.requestDialysisSchedules()         
676
-    }, 1000 * 60);            
668
+  mounted() {
669
+    const timer = setInterval(() => {
670
+      // this.getInitData();
671
+      this.requestDialysisSchedules()
672
+    }, 1000 * 60)
677 673
     // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
678
-    this.$once('hook:beforeDestroy', () => {            
679
-        clearInterval(timer);                                    
674
+    this.$once('hook:beforeDestroy', () => {
675
+      clearInterval(timer)
680 676
     })
681
-    
682 677
   },
683 678
   computed: {
684 679
     steps: function() {
@@ -788,7 +783,7 @@ export default {
788 783
       //     schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
789 784
       //   }
790 785
       // }
791
-      
786
+
792 787
       // return schedules
793 788
     }
794 789
   },
@@ -871,7 +866,6 @@ export default {
871 866
             if (prescription.body_fluid == -2) {
872 867
               prescription.body_fluid = 0
873 868
             }
874
-
875 869
           }
876 870
           console.log('透析处方', prescription)
877 871
           var solution = resp.data.solution // 透析方案
@@ -931,7 +925,6 @@ export default {
931 925
             schedual,
932 926
             system_prescribe
933 927
           )
934
-          
935 928
 
936 929
           var headNurses = resp.data.headNurse
937 930
 
@@ -1027,7 +1020,7 @@ export default {
1027 1020
         '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
1028 1021
       )
1029 1022
     },
1030
-    //日期
1023
+    // 日期
1031 1024
     handleScheduleDateChange: function(index) {
1032 1025
       this.treatStateVal = 0
1033 1026
       this.patientStateVal = 0
@@ -1043,7 +1036,7 @@ export default {
1043 1036
       this.$store.dispatch('SetSelectedDate', { selected_date: index })
1044 1037
       this.requestDialysisSchedules()
1045 1038
     },
1046
-    //初始化数据
1039
+    // 初始化数据
1047 1040
     getInitData: function() {
1048 1041
       getDialysisRecordInitData().then(rs => {
1049 1042
         var resp = rs.data
@@ -1059,7 +1052,6 @@ export default {
1059 1052
           // this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
1060 1053
           this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
1061 1054
           this.requestDialysisSchedules()
1062
-          this.getData()
1063 1055
         } else {
1064 1056
           this.$message.error(resp.msg)
1065 1057
         }
@@ -1072,14 +1064,14 @@ export default {
1072 1064
       this.search_keyword = this.search_input = ''
1073 1065
       this.getData()
1074 1066
     },
1075
-    //分区
1067
+    // 分区
1076 1068
     handleZoneChange: function(index) {
1077 1069
       this.zoneVal = index
1078 1070
       this.$store.dispatch('SetZoneSelected', { zone_selected: index })
1079 1071
       this.search_keyword = this.search_input = ''
1080 1072
       this.getData()
1081 1073
     },
1082
-    //患者状态
1074
+    // 患者状态
1083 1075
     handleStateChange: function(index) {
1084 1076
       this.patientStateVal = index
1085 1077
       this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
@@ -1123,18 +1115,17 @@ export default {
1123 1115
       this.zoneVal = 0
1124 1116
       this.treatStateVal = 0
1125 1117
       this.patientStateVal = 0
1126
-      if(this.search_input != ''){
1127
-        let arr = []
1118
+      if (this.search_input != '') {
1119
+        const arr = []
1128 1120
         this.filtedSchedules.map(item => {
1129 1121
           arr.push(...item.schedules)
1130 1122
         })
1131
-        if(this.activeName == "first"){
1123
+        if (this.activeName == 'first') {
1132 1124
           this.tableData = arr
1133
-        }else if(this.activeName == "second"){
1125
+        } else if (this.activeName == 'second') {
1134 1126
           this.tableData1 = arr
1135 1127
         }
1136
-        
1137
-      }else{
1128
+      } else {
1138 1129
         this.getData()
1139 1130
       }
1140 1131
     },
@@ -1145,158 +1136,154 @@ export default {
1145 1136
         if (resp.state == 1) {
1146 1137
           var schedules = resp.data.schedules
1147 1138
           this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
1148
-          let patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
1149
-          if(this.activeName == "first"){
1139
+          const patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
1140
+          if (this.activeName == 'first') {
1150 1141
             for (let i = 0; i < patientArr.length; i++) {
1151
-              
1152 1142
               for (let j = 0; j < patientArr[i].schedules.length; j++) {
1153 1143
                 if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
1154 1144
                   // 删除元素后改变i的值
1155
-                  patientArr[i].schedules.splice(j--, 1);
1145
+                  patientArr[i].schedules.splice(j--, 1)
1156 1146
                 }
1157 1147
               }
1158 1148
             }
1159
-          }else if(this.activeName == "second"){
1149
+          } else if (this.activeName == 'second') {
1160 1150
             for (let i = 0; i < patientArr.length; i++) {
1161 1151
               for (let j = 0; j < patientArr[i].schedules.length; j++) {
1162 1152
                 if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
1163 1153
                   // 删除元素后改变i的值
1164
-                  patientArr[i].schedules.splice(j--, 1);
1154
+                  patientArr[i].schedules.splice(j--, 1)
1165 1155
                 }
1166 1156
               }
1167 1157
             }
1168 1158
           }
1169
-          let newArr = []
1159
+          const newArr = []
1170 1160
           patientArr.map(item => {
1171 1161
             newArr.push(...item.schedules)
1172 1162
           })
1173 1163
           this.tableData = newArr
1164
+          this.getData()
1174 1165
           // console.log(66666666666,this.tableData)
1175 1166
         } else {
1176 1167
           this.$message.error(resp.msg)
1177 1168
         }
1178 1169
       })
1179 1170
     },
1180
-    changePatient(schedual){
1171
+    changePatient(schedual) {
1181 1172
       console.log(schedual)
1182
-      this.patient_id = schedual.patient_id;
1183
-      this.date = schedual.schedule_date;
1173
+      this.patient_id = schedual.patient_id
1174
+      this.date = schedual.schedule_date
1184 1175
       // this.getScheduleDetail();
1185 1176
       // this.getLongAdvice();
1186
-      
1187
-      var patient_id = schedual.patient_id;
1188
-      var date = schedual.schedule_date;
1177
+
1178
+      var patient_id = schedual.patient_id
1179
+      var date = schedual.schedule_date
1189 1180
       this.$router.push({
1190
-        path: "/dialysis/details",
1181
+        path: '/dialysis/details',
1191 1182
         query: {
1192 1183
           patient_id: patient_id,
1193 1184
           date: date,
1194 1185
           patient_name: schedual.patient.name
1195 1186
         }
1196
-      });
1187
+      })
1197 1188
     },
1198
-    handleClick(){
1189
+    handleClick() {
1199 1190
       this.getData()
1200 1191
     },
1201
-    getData(){
1202
-    
1192
+    getData() {
1203 1193
       let patientArr = []
1204 1194
       patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
1205
-        
1206
-      if(this.activeName == "first"){
1195
+
1196
+      if (this.activeName == 'first') {
1207 1197
         for (let i = 0; i < patientArr.length; i++) {
1208
-          
1209 1198
           for (let j = 0; j < patientArr[i].schedules.length; j++) {
1210 1199
             if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
1211 1200
               // 删除元素后改变i的值
1212
-              
1213
-              console.log("候诊区",patientArr[i].schedules[j])
1214
-              patientArr[i].schedules.splice(j--, 1);
1201
+
1202
+              console.log('候诊区', patientArr[i].schedules[j])
1203
+              patientArr[i].schedules.splice(j--, 1)
1215 1204
             }
1216 1205
           }
1217 1206
         }
1218 1207
         let arr1 = []
1219
-        if(this.patientStateVal == 0){
1208
+        if (this.patientStateVal == 0) {
1220 1209
           arr1 = patientArr
1221
-        }else if(this.patientStateVal == 1){
1210
+        } else if (this.patientStateVal == 1) {
1222 1211
           let arr = []
1223 1212
           arr = patientArr
1224
-          for (let i = 0; i <arr.length; i++) {
1213
+          for (let i = 0; i < arr.length; i++) {
1225 1214
             for (let j = 0; j < arr[i].schedules.length; j++) {
1226 1215
               if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
1227 1216
                 // 删除元素后改变i的值
1228
-                arr[i].schedules.splice(j--, 1);
1217
+                arr[i].schedules.splice(j--, 1)
1229 1218
               }
1230 1219
             }
1231 1220
           }
1232
-          console.log("执行1",arr)
1221
+          console.log('执行1', arr)
1233 1222
           arr1 = arr
1234
-        }else if(this.patientStateVal == 2){
1223
+        } else if (this.patientStateVal == 2) {
1235 1224
           let arr = []
1236 1225
           arr = patientArr
1237 1226
           for (let i = 0; i < arr.length; i++) {
1238 1227
             for (let j = 0; j < arr[i].schedules.length; j++) {
1239 1228
               if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
1240 1229
                 // 删除元素后改变i的值
1241
-                arr[i].schedules.splice(j--, 1);
1230
+                arr[i].schedules.splice(j--, 1)
1242 1231
               }
1243 1232
             }
1244 1233
           }
1245
-          console.log("执行2",arr)
1234
+          console.log('执行2', arr)
1246 1235
           arr1 = arr
1247 1236
         }
1248 1237
 
1249 1238
         let arr2 = []
1250
-        if(this.treatStateVal == 0){
1239
+        if (this.treatStateVal == 0) {
1251 1240
           arr2 = JSON.parse(JSON.stringify(arr1))
1252
-        }else if(this.treatStateVal == 1){
1241
+        } else if (this.treatStateVal == 1) {
1253 1242
           let arr = []
1254 1243
           arr = JSON.parse(JSON.stringify(arr1))
1255 1244
           for (let i = 0; i < arr.length; i++) {
1256 1245
             for (let j = 0; j < arr[i].schedules.length; j++) {
1257 1246
               if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
1258 1247
                 // 删除元素后改变i的值
1259
-                arr[i].schedules.splice(j--, 1);
1248
+                arr[i].schedules.splice(j--, 1)
1260 1249
               }
1261 1250
             }
1262 1251
           }
1263 1252
           arr2 = arr
1264 1253
         }
1265
-        
1266 1254
 
1267 1255
         let arr3 = []
1268
-        if(this.scheduleStateVal == 0){
1256
+        if (this.scheduleStateVal == 0) {
1269 1257
           arr3 = JSON.parse(JSON.stringify(arr2))
1270
-        }else{
1258
+        } else {
1271 1259
           let arr = []
1272 1260
           arr = JSON.parse(JSON.stringify(arr2))
1273 1261
           for (let i = 0; i < arr.length; i++) {
1274 1262
             for (let j = 0; j < arr[i].schedules.length; j++) {
1275 1263
               if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
1276 1264
                 // 删除元素后改变i的值
1277
-                arr[i].schedules.splice(j--, 1);
1265
+                arr[i].schedules.splice(j--, 1)
1278 1266
               }
1279 1267
             }
1280 1268
           }
1281 1269
           arr3 = arr
1282 1270
         }
1283
-        
1284 1271
 
1285 1272
         let arr4 = []
1286
-        if(this.zoneVal == 0){
1273
+        if (this.zoneVal == 0) {
1287 1274
           arr4 = JSON.parse(JSON.stringify(arr3))
1288
-        }else{
1275
+        } else {
1289 1276
           let arr = []
1290 1277
           arr = JSON.parse(JSON.stringify(arr3))
1291 1278
           for (let i = 0; i < arr.length; i++) {
1292 1279
             if (this.zoneVal != arr[i].zone_id) {
1293 1280
               // 删除元素后改变i的值
1294
-              arr.splice(i--, 1);
1281
+              arr.splice(i--, 1)
1295 1282
             }
1296 1283
           }
1297 1284
           arr4 = arr
1298 1285
         }
1299
-        let newArr = []
1286
+        const newArr = []
1300 1287
         arr4.map(item => {
1301 1288
           newArr.push(...item.schedules)
1302 1289
         })
@@ -1308,132 +1295,127 @@ export default {
1308 1295
         }
1309 1296
         console.log('排序',newArr)
1310 1297
         this.tableData = newArr
1311
-        let name = this.$route.query.patient_name
1312
-        this.tableData.map((item,index) => {
1313
-          if(name == item.patient.name){
1314
-            if(item.assessment_before_dislysis != null){
1298
+        const name = this.$route.query.patient_name
1299
+        this.tableData.map((item, index) => {
1300
+          if (name == item.patient.name) {
1301
+            if (item.assessment_before_dislysis != null) {
1315 1302
               this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
1316 1303
             }
1317
-            
1318
-            setTimeout(()=>{
1319
-              this.$refs.tab.setCurrentRow(this.tableData[index]);
1320
-            },10)
1304
+
1305
+            setTimeout(() => {
1306
+              this.$refs.tab.setCurrentRow(this.tableData[index])
1307
+            }, 10)
1321 1308
           }
1322 1309
         })
1323
-
1324
-      }else if(this.activeName == "second"){
1310
+      } else if (this.activeName == 'second') {
1325 1311
         for (let i = 0; i < patientArr.length; i++) {
1326 1312
           for (let j = 0; j < patientArr[i].schedules.length; j++) {
1327 1313
             if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
1328 1314
               // 删除元素后改变i的值
1329
-              console.log("透析区",patientArr[i].schedules[j])
1330
-              patientArr[i].schedules.splice(j--, 1);
1315
+              console.log('透析区', patientArr[i].schedules[j])
1316
+              patientArr[i].schedules.splice(j--, 1)
1331 1317
             }
1332 1318
           }
1333 1319
         }
1334 1320
         let arr1 = []
1335
-        console.log('patientArr',patientArr)
1336
-        // let patientArr = 
1337
-        if(this.patientStateVal == 0){
1321
+        console.log('patientArr', patientArr)
1322
+        // let patientArr =
1323
+        if (this.patientStateVal == 0) {
1338 1324
           arr1 = patientArr
1339
-        }else if(this.patientStateVal == 3){
1325
+        } else if (this.patientStateVal == 3) {
1340 1326
           let arr = []
1341 1327
           arr = patientArr
1342
-          for (let i = 0; i <arr.length; i++) {
1328
+          for (let i = 0; i < arr.length; i++) {
1343 1329
             for (let j = 0; j < arr[i].schedules.length; j++) {
1344 1330
               if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
1345 1331
                 // 删除元素后改变i的值
1346
-                arr[i].schedules.splice(j--, 1);
1332
+                arr[i].schedules.splice(j--, 1)
1347 1333
               }
1348 1334
             }
1349 1335
           }
1350
-          console.log("执行1",arr)
1336
+          console.log('执行1', arr)
1351 1337
           arr1 = arr
1352
-        }else if(this.patientStateVal == 4){
1338
+        } else if (this.patientStateVal == 4) {
1353 1339
           let arr = []
1354 1340
           arr = patientArr
1355 1341
           for (let i = 0; i < arr.length; i++) {
1356 1342
             for (let j = 0; j < arr[i].schedules.length; j++) {
1357 1343
               if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
1358 1344
                 // 删除元素后改变i的值
1359
-                arr[i].schedules.splice(j--, 1);
1345
+                arr[i].schedules.splice(j--, 1)
1360 1346
               }
1361 1347
             }
1362 1348
           }
1363
-          console.log("执行2",arr)
1349
+          console.log('执行2', arr)
1364 1350
           arr1 = arr
1365 1351
         }
1366 1352
 
1367 1353
         let arr2 = []
1368
-        if(this.treatStateVal == 0){
1354
+        if (this.treatStateVal == 0) {
1369 1355
           arr2 = JSON.parse(JSON.stringify(arr1))
1370
-        }else if(this.treatStateVal == 2){
1356
+        } else if (this.treatStateVal == 2) {
1371 1357
           let arr = []
1372 1358
           arr = JSON.parse(JSON.stringify(arr1))
1373 1359
           for (let i = 0; i < arr.length; i++) {
1374 1360
             for (let j = 0; j < arr[i].schedules.length; j++) {
1375 1361
               if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
1376 1362
                 // 删除元素后改变i的值
1377
-                arr[i].schedules.splice(j--, 1);
1363
+                arr[i].schedules.splice(j--, 1)
1378 1364
               }
1379 1365
             }
1380 1366
           }
1381 1367
           arr2 = arr
1382 1368
         }
1383
-        
1384 1369
 
1385 1370
         let arr3 = []
1386
-        if(this.scheduleStateVal == 0){
1371
+        if (this.scheduleStateVal == 0) {
1387 1372
           arr3 = JSON.parse(JSON.stringify(arr2))
1388
-        }else{
1373
+        } else {
1389 1374
           let arr = []
1390 1375
           arr = JSON.parse(JSON.stringify(arr2))
1391 1376
           for (let i = 0; i < arr.length; i++) {
1392 1377
             for (let j = 0; j < arr[i].schedules.length; j++) {
1393 1378
               if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
1394 1379
                 // 删除元素后改变i的值
1395
-                arr[i].schedules.splice(j--, 1);
1380
+                arr[i].schedules.splice(j--, 1)
1396 1381
               }
1397 1382
             }
1398 1383
           }
1399 1384
           arr3 = arr
1400 1385
         }
1401
-        
1402 1386
 
1403 1387
         let arr4 = []
1404
-        if(this.zoneVal == 0){
1388
+        if (this.zoneVal == 0) {
1405 1389
           arr4 = JSON.parse(JSON.stringify(arr3))
1406
-        }else{
1390
+        } else {
1407 1391
           let arr = []
1408 1392
           arr = JSON.parse(JSON.stringify(arr3))
1409 1393
           for (let i = 0; i < arr.length; i++) {
1410 1394
             if (this.zoneVal != arr[i].zone_id) {
1411 1395
               // 删除元素后改变i的值
1412
-              arr.splice(i--, 1);
1396
+              arr.splice(i--, 1)
1413 1397
             }
1414 1398
           }
1415 1399
           arr4 = arr
1416 1400
         }
1417
-        let newArr = []
1401
+        const newArr = []
1418 1402
         arr4.map(item => {
1419 1403
           newArr.push(...item.schedules)
1420 1404
         })
1421 1405
         this.tableData1 = newArr
1422
-        let name = this.$route.query.patient_name
1423
-        this.tableData1.map((item,index) => {
1424
-          if(name == item.patient.name){
1425
-            if(item.assessment_before_dislysis != null){
1406
+        const name = this.$route.query.patient_name
1407
+        this.tableData1.map((item, index) => {
1408
+          if (name == item.patient.name) {
1409
+            if (item.assessment_before_dislysis != null) {
1426 1410
               this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
1427 1411
             }
1428
-            
1429
-            setTimeout(()=>{
1430
-              this.$refs.tab1.setCurrentRow(this.tableData1[index]);
1431
-            },10)
1412
+
1413
+            setTimeout(() => {
1414
+              this.$refs.tab1.setCurrentRow(this.tableData1[index])
1415
+            }, 10)
1432 1416
           }
1433 1417
         })
1434 1418
       }
1435
-
1436
-      
1437 1419
     },
1438 1420
     compare(property){
1439 1421
       return function(a,b){
@@ -1442,7 +1424,7 @@ export default {
1442 1424
         return value1 - value2;
1443 1425
       }
1444 1426
     }
1445
-  },
1427
+  }
1446 1428
 }
1447 1429
 </script>
1448 1430