|
@@ -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,290 +1136,281 @@ 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
|
})
|
1303
|
1290
|
this.tableData = newArr
|
1304
|
|
- let name = this.$route.query.patient_name
|
1305
|
|
- this.tableData.map((item,index) => {
|
1306
|
|
- if(name == item.patient.name){
|
1307
|
|
- if(item.assessment_before_dislysis != null){
|
|
1291
|
+ const name = this.$route.query.patient_name
|
|
1292
|
+ this.tableData.map((item, index) => {
|
|
1293
|
+ if (name == item.patient.name) {
|
|
1294
|
+ if (item.assessment_before_dislysis != null) {
|
1308
|
1295
|
this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
|
1309
|
1296
|
}
|
1310
|
|
-
|
1311
|
|
- setTimeout(()=>{
|
1312
|
|
- this.$refs.tab.setCurrentRow(this.tableData[index]);
|
1313
|
|
- },10)
|
|
1297
|
+
|
|
1298
|
+ setTimeout(() => {
|
|
1299
|
+ this.$refs.tab.setCurrentRow(this.tableData[index])
|
|
1300
|
+ }, 10)
|
1314
|
1301
|
}
|
1315
|
1302
|
})
|
1316
|
|
-
|
1317
|
|
- }else if(this.activeName == "second"){
|
|
1303
|
+ } else if (this.activeName == 'second') {
|
1318
|
1304
|
for (let i = 0; i < patientArr.length; i++) {
|
1319
|
1305
|
for (let j = 0; j < patientArr[i].schedules.length; j++) {
|
1320
|
1306
|
if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
|
1321
|
1307
|
// 删除元素后改变i的值
|
1322
|
|
- console.log("透析区",patientArr[i].schedules[j])
|
1323
|
|
- patientArr[i].schedules.splice(j--, 1);
|
|
1308
|
+ console.log('透析区', patientArr[i].schedules[j])
|
|
1309
|
+ patientArr[i].schedules.splice(j--, 1)
|
1324
|
1310
|
}
|
1325
|
1311
|
}
|
1326
|
1312
|
}
|
1327
|
1313
|
let arr1 = []
|
1328
|
|
- console.log('patientArr',patientArr)
|
1329
|
|
- // let patientArr =
|
1330
|
|
- if(this.patientStateVal == 0){
|
|
1314
|
+ console.log('patientArr', patientArr)
|
|
1315
|
+ // let patientArr =
|
|
1316
|
+ if (this.patientStateVal == 0) {
|
1331
|
1317
|
arr1 = patientArr
|
1332
|
|
- }else if(this.patientStateVal == 3){
|
|
1318
|
+ } else if (this.patientStateVal == 3) {
|
1333
|
1319
|
let arr = []
|
1334
|
1320
|
arr = patientArr
|
1335
|
|
- for (let i = 0; i <arr.length; i++) {
|
|
1321
|
+ for (let i = 0; i < arr.length; i++) {
|
1336
|
1322
|
for (let j = 0; j < arr[i].schedules.length; j++) {
|
1337
|
1323
|
if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
|
1338
|
1324
|
// 删除元素后改变i的值
|
1339
|
|
- arr[i].schedules.splice(j--, 1);
|
|
1325
|
+ arr[i].schedules.splice(j--, 1)
|
1340
|
1326
|
}
|
1341
|
1327
|
}
|
1342
|
1328
|
}
|
1343
|
|
- console.log("执行1",arr)
|
|
1329
|
+ console.log('执行1', arr)
|
1344
|
1330
|
arr1 = arr
|
1345
|
|
- }else if(this.patientStateVal == 4){
|
|
1331
|
+ } else if (this.patientStateVal == 4) {
|
1346
|
1332
|
let arr = []
|
1347
|
1333
|
arr = patientArr
|
1348
|
1334
|
for (let i = 0; i < arr.length; i++) {
|
1349
|
1335
|
for (let j = 0; j < arr[i].schedules.length; j++) {
|
1350
|
1336
|
if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
|
1351
|
1337
|
// 删除元素后改变i的值
|
1352
|
|
- arr[i].schedules.splice(j--, 1);
|
|
1338
|
+ arr[i].schedules.splice(j--, 1)
|
1353
|
1339
|
}
|
1354
|
1340
|
}
|
1355
|
1341
|
}
|
1356
|
|
- console.log("执行2",arr)
|
|
1342
|
+ console.log('执行2', arr)
|
1357
|
1343
|
arr1 = arr
|
1358
|
1344
|
}
|
1359
|
1345
|
|
1360
|
1346
|
let arr2 = []
|
1361
|
|
- if(this.treatStateVal == 0){
|
|
1347
|
+ if (this.treatStateVal == 0) {
|
1362
|
1348
|
arr2 = JSON.parse(JSON.stringify(arr1))
|
1363
|
|
- }else if(this.treatStateVal == 2){
|
|
1349
|
+ } else if (this.treatStateVal == 2) {
|
1364
|
1350
|
let arr = []
|
1365
|
1351
|
arr = JSON.parse(JSON.stringify(arr1))
|
1366
|
1352
|
for (let i = 0; i < arr.length; i++) {
|
1367
|
1353
|
for (let j = 0; j < arr[i].schedules.length; j++) {
|
1368
|
1354
|
if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
|
1369
|
1355
|
// 删除元素后改变i的值
|
1370
|
|
- arr[i].schedules.splice(j--, 1);
|
|
1356
|
+ arr[i].schedules.splice(j--, 1)
|
1371
|
1357
|
}
|
1372
|
1358
|
}
|
1373
|
1359
|
}
|
1374
|
1360
|
arr2 = arr
|
1375
|
1361
|
}
|
1376
|
|
-
|
1377
|
1362
|
|
1378
|
1363
|
let arr3 = []
|
1379
|
|
- if(this.scheduleStateVal == 0){
|
|
1364
|
+ if (this.scheduleStateVal == 0) {
|
1380
|
1365
|
arr3 = JSON.parse(JSON.stringify(arr2))
|
1381
|
|
- }else{
|
|
1366
|
+ } else {
|
1382
|
1367
|
let arr = []
|
1383
|
1368
|
arr = JSON.parse(JSON.stringify(arr2))
|
1384
|
1369
|
for (let i = 0; i < arr.length; i++) {
|
1385
|
1370
|
for (let j = 0; j < arr[i].schedules.length; j++) {
|
1386
|
1371
|
if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
|
1387
|
1372
|
// 删除元素后改变i的值
|
1388
|
|
- arr[i].schedules.splice(j--, 1);
|
|
1373
|
+ arr[i].schedules.splice(j--, 1)
|
1389
|
1374
|
}
|
1390
|
1375
|
}
|
1391
|
1376
|
}
|
1392
|
1377
|
arr3 = arr
|
1393
|
1378
|
}
|
1394
|
|
-
|
1395
|
1379
|
|
1396
|
1380
|
let arr4 = []
|
1397
|
|
- if(this.zoneVal == 0){
|
|
1381
|
+ if (this.zoneVal == 0) {
|
1398
|
1382
|
arr4 = JSON.parse(JSON.stringify(arr3))
|
1399
|
|
- }else{
|
|
1383
|
+ } else {
|
1400
|
1384
|
let arr = []
|
1401
|
1385
|
arr = JSON.parse(JSON.stringify(arr3))
|
1402
|
1386
|
for (let i = 0; i < arr.length; i++) {
|
1403
|
1387
|
if (this.zoneVal != arr[i].zone_id) {
|
1404
|
1388
|
// 删除元素后改变i的值
|
1405
|
|
- arr.splice(i--, 1);
|
|
1389
|
+ arr.splice(i--, 1)
|
1406
|
1390
|
}
|
1407
|
1391
|
}
|
1408
|
1392
|
arr4 = arr
|
1409
|
1393
|
}
|
1410
|
|
- let newArr = []
|
|
1394
|
+ const newArr = []
|
1411
|
1395
|
arr4.map(item => {
|
1412
|
1396
|
newArr.push(...item.schedules)
|
1413
|
1397
|
})
|
1414
|
1398
|
this.tableData1 = newArr
|
1415
|
|
- let name = this.$route.query.patient_name
|
1416
|
|
- this.tableData1.map((item,index) => {
|
1417
|
|
- if(name == item.patient.name){
|
1418
|
|
- if(item.assessment_before_dislysis != null){
|
|
1399
|
+ const name = this.$route.query.patient_name
|
|
1400
|
+ this.tableData1.map((item, index) => {
|
|
1401
|
+ if (name == item.patient.name) {
|
|
1402
|
+ if (item.assessment_before_dislysis != null) {
|
1419
|
1403
|
this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
|
1420
|
1404
|
}
|
1421
|
|
-
|
1422
|
|
- setTimeout(()=>{
|
1423
|
|
- this.$refs.tab1.setCurrentRow(this.tableData1[index]);
|
1424
|
|
- },10)
|
|
1405
|
+
|
|
1406
|
+ setTimeout(() => {
|
|
1407
|
+ this.$refs.tab1.setCurrentRow(this.tableData1[index])
|
|
1408
|
+ }, 10)
|
1425
|
1409
|
}
|
1426
|
1410
|
})
|
1427
|
1411
|
}
|
1428
|
|
-
|
1429
|
|
-
|
1430
|
1412
|
}
|
1431
|
|
- },
|
|
1413
|
+ }
|
1432
|
1414
|
}
|
1433
|
1415
|
</script>
|
1434
|
1416
|
|