|
@@ -40,7 +40,7 @@
|
40
|
40
|
</div>
|
41
|
41
|
</div>
|
42
|
42
|
|
43
|
|
- <div class="row" :class="this.monitors.length < 12 ? '': 'margin-bottom-300'">
|
|
43
|
+ <div class="row" :class="this.monitors.length > 8 ? 'margin-bottom-300': ''">
|
44
|
44
|
<table class="proj_table" >
|
45
|
45
|
<tbody>
|
46
|
46
|
<tr><td colspan="2">一、透析前护理评估:</td></tr>
|
|
@@ -277,7 +277,7 @@
|
277
|
277
|
</tbody>
|
278
|
278
|
</table>
|
279
|
279
|
</div>
|
280
|
|
- <template v-if="this.monitors.length > 12 && this.monitors.length < 22">
|
|
280
|
+ <template v-if="this.monitors.length > 8 ">
|
281
|
281
|
<div class="order-yy-name">{{orgname}}</div>
|
282
|
282
|
<div class="order-title">血液净化专科护理记录单</div>
|
283
|
283
|
<div class="row" style="margin-top: 15px;">
|
|
@@ -316,8 +316,8 @@
|
316
|
316
|
</div>
|
317
|
317
|
</div>
|
318
|
318
|
</template>
|
319
|
|
- <div class="row" :style="this.monitors.length < 12 ? 'margin-top:-11px':''">
|
320
|
|
- <table class="proj_table" :class="this.monitors.length > 12 ? 'margin-bottom-600':'margin-bottom-300'">
|
|
319
|
+ <div class="row" :style="this.monitors.length < 8 ? 'margin-top:-11px':''">
|
|
320
|
+ <table class="proj_table" :class="this.monitors.length > 8 ? 'margin-bottom-900':'margin-bottom-300'">
|
321
|
321
|
<tbody>
|
322
|
322
|
<tr v-if="this.monitors2.length > 0">
|
323
|
323
|
<td style="padding: 0;" colspan="2">
|
|
@@ -913,7 +913,7 @@
|
913
|
913
|
|
914
|
914
|
export default {
|
915
|
915
|
name: 'dialysisPrintOrder',
|
916
|
|
- props: ["childResponse"],
|
|
916
|
+ props: ['childResponse'],
|
917
|
917
|
components: {
|
918
|
918
|
// DialysisPrintOrderOne,
|
919
|
919
|
// DialysisPrintOrderTwo,
|
|
@@ -1096,234 +1096,277 @@
|
1096
|
1096
|
this.loading = true
|
1097
|
1097
|
|
1098
|
1098
|
// getDialysisRecord(this.queryParams).then(response => {
|
1099
|
|
- var response = this.childResponse
|
1100
|
|
- if (response.data.state == 1) {
|
1101
|
|
- this.adminUser = response.data.data.users
|
1102
|
|
- this.users = response.data.data.users
|
1103
|
|
- this.patientInfo = response.data.data.patientInfo
|
1104
|
|
- this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
1105
|
|
- // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
|
1106
|
|
- if (response.data.data.patientInfo.first_dialysis_date != 0) {
|
1107
|
|
- this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
|
1108
|
|
- } else {
|
1109
|
|
- this.patientInfo.first_dialysis_date = ''
|
1110
|
|
- }
|
1111
|
|
- this.check = response.data.data.check
|
1112
|
|
- this.predialysis = response.data.data.PredialysisEvaluation
|
1113
|
|
- this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
|
1114
|
|
- this.afterdialysis = response.data.data.AssessmentAfterDislysis
|
1115
|
|
- this.operators = response.data.data.operators
|
1116
|
|
- this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
|
1117
|
|
-
|
1118
|
|
- if (this.operators.length > 0) {
|
1119
|
|
- var operatorsLen = this.operators.length
|
1120
|
|
- for (var index = 0; index < operatorsLen; index++) {
|
1121
|
|
- this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
|
1122
|
|
- }
|
|
1099
|
+ var response = this.childResponse
|
|
1100
|
+ if (response.data.state == 1) {
|
|
1101
|
+ this.adminUser = response.data.data.users
|
|
1102
|
+ this.users = response.data.data.users
|
|
1103
|
+ this.patientInfo = response.data.data.patientInfo
|
|
1104
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
1105
|
+ // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
|
|
1106
|
+ if (response.data.data.patientInfo.first_dialysis_date != 0) {
|
|
1107
|
+ this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
|
|
1108
|
+ } else {
|
|
1109
|
+ this.patientInfo.first_dialysis_date = ''
|
|
1110
|
+ }
|
|
1111
|
+ this.check = response.data.data.check
|
|
1112
|
+ this.predialysis = response.data.data.PredialysisEvaluation
|
|
1113
|
+ this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
|
|
1114
|
+ this.afterdialysis = response.data.data.AssessmentAfterDislysis
|
|
1115
|
+ this.operators = response.data.data.operators
|
|
1116
|
+ this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
|
|
1117
|
+
|
|
1118
|
+ if (this.operators.length > 0) {
|
|
1119
|
+ var operatorsLen = this.operators.length
|
|
1120
|
+ for (var index = 0; index < operatorsLen; index++) {
|
|
1121
|
+ this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
|
1123
|
1122
|
}
|
|
1123
|
+ }
|
1124
|
1124
|
|
1125
|
|
- this.afterdialysis.txqnx = -1
|
1126
|
|
- if (this.afterdialysis.cruor.indexOf('0度') > -1) {
|
1127
|
|
- this.afterdialysis.txqnx = 0
|
1128
|
|
- }
|
1129
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
|
1130
|
|
- this.afterdialysis.txqnx = 1
|
1131
|
|
- }
|
1132
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
|
1133
|
|
- this.afterdialysis.txqnx = 2
|
1134
|
|
- }
|
1135
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
|
1136
|
|
- this.afterdialysis.txqnx = 3
|
1137
|
|
- }
|
|
1125
|
+ this.afterdialysis.txqnx = -1
|
|
1126
|
+ if (this.afterdialysis.cruor.indexOf('0度') > -1) {
|
|
1127
|
+ this.afterdialysis.txqnx = 0
|
|
1128
|
+ }
|
|
1129
|
+ if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
|
|
1130
|
+ this.afterdialysis.txqnx = 1
|
|
1131
|
+ }
|
|
1132
|
+ if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
|
|
1133
|
+ this.afterdialysis.txqnx = 2
|
|
1134
|
+ }
|
|
1135
|
+ if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
|
|
1136
|
+ this.afterdialysis.txqnx = 3
|
|
1137
|
+ }
|
1138
|
1138
|
|
1139
|
|
- this.afterdialysis.complications = this.afterdialysis.complication.split(',')
|
1140
|
|
- this.afterdialysis.complications_other = []
|
1141
|
|
- this.afterdialysis.complications_index = []
|
1142
|
|
- var acllen = this.afterdialysis.complications.length
|
1143
|
|
- for (let index = 0; index < acllen; index++) {
|
1144
|
|
- if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
|
1145
|
|
- this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
|
1146
|
|
- } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
|
1147
|
|
- this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
|
1148
|
|
- }
|
|
1139
|
+ this.afterdialysis.complications = this.afterdialysis.complication.split(',')
|
|
1140
|
+ this.afterdialysis.complications_other = []
|
|
1141
|
+ this.afterdialysis.complications_index = []
|
|
1142
|
+ var acllen = this.afterdialysis.complications.length
|
|
1143
|
+ for (let index = 0; index < acllen; index++) {
|
|
1144
|
+ if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
|
|
1145
|
+ this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
|
|
1146
|
+ } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
|
|
1147
|
+ this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
|
1149
|
1148
|
}
|
1150
|
|
- this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
|
1151
|
|
-
|
1152
|
|
- this.prescription = response.data.data.dialysisPrescription
|
1153
|
|
- this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
|
1154
|
|
-
|
1155
|
|
- this.prescription.mode = this.modeName(this.prescription.mode_id)
|
1156
|
|
- var rwLen = this.replacementWays.length
|
1157
|
|
- this.prescription.replacement = ''
|
1158
|
|
- for (let index = 0; index < rwLen; index++) {
|
1159
|
|
- if (this.replacementWays[index].id == this.prescription.replacement_way) {
|
1160
|
|
- this.prescription.replacement = this.replacementWays[index].name
|
1161
|
|
- break
|
1162
|
|
- }
|
|
1149
|
+ }
|
|
1150
|
+ this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
|
|
1151
|
+
|
|
1152
|
+ this.prescription = response.data.data.dialysisPrescription
|
|
1153
|
+ this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
|
|
1154
|
+
|
|
1155
|
+ this.prescription.mode = this.modeName(this.prescription.mode_id)
|
|
1156
|
+ var rwLen = this.replacementWays.length
|
|
1157
|
+ this.prescription.replacement = ''
|
|
1158
|
+ for (let index = 0; index < rwLen; index++) {
|
|
1159
|
+ if (this.replacementWays[index].id == this.prescription.replacement_way) {
|
|
1160
|
+ this.prescription.replacement = this.replacementWays[index].name
|
|
1161
|
+ break
|
1163
|
1162
|
}
|
|
1163
|
+ }
|
1164
|
1164
|
|
1165
|
|
- this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
|
|
1165
|
+ this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
|
1166
|
1166
|
|
1167
|
|
- var paLen = this.perfusionApparatus.length
|
1168
|
|
- this.prescription.perfusion_apparatus_name = ''
|
1169
|
|
- for (let index = 0; index < paLen; index++) {
|
1170
|
|
- if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
|
1171
|
|
- this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
|
1172
|
|
- break
|
1173
|
|
- }
|
|
1167
|
+ var paLen = this.perfusionApparatus.length
|
|
1168
|
+ this.prescription.perfusion_apparatus_name = ''
|
|
1169
|
+ for (let index = 0; index < paLen; index++) {
|
|
1170
|
+ if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
|
|
1171
|
+ this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
|
|
1172
|
+ break
|
1174
|
1173
|
}
|
|
1174
|
+ }
|
1175
|
1175
|
|
1176
|
|
- var acLen = this.anticoagulantsConfit.length
|
1177
|
|
- var thisALID = this.prescription.anticoagulant
|
1178
|
|
- this.prescription.anticoagulant_name = ''
|
|
1176
|
+ var acLen = this.anticoagulantsConfit.length
|
|
1177
|
+ var thisALID = this.prescription.anticoagulant
|
|
1178
|
+ this.prescription.anticoagulant_name = ''
|
1179
|
1179
|
|
1180
|
|
- if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
|
1181
|
|
- this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
|
1182
|
|
- this.AlPanel = this.anticoagulantsConfit[thisALID]
|
1183
|
|
- }
|
|
1180
|
+ if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
|
|
1181
|
+ this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
|
|
1182
|
+ this.AlPanel = this.anticoagulantsConfit[thisALID]
|
|
1183
|
+ }
|
1184
|
1184
|
|
1185
|
|
- this.advices = response.data.data.advices
|
1186
|
|
- this.monitors = response.data.data.monitors
|
1187
|
|
- this.summary = response.data.data.summary
|
1188
|
|
- this.org_template_info = response.data.data.org_template_info
|
1189
|
|
- if (this.monitors.length < 8) {
|
1190
|
|
- var nl = 8 - this.monitors.length
|
1191
|
|
- for (let index = 0; index < nl; index++) {
|
1192
|
|
- if( this.monitors[index] == undefined || this.monitors[index].length <= 0){
|
|
1185
|
+ this.advices = response.data.data.advices
|
|
1186
|
+ this.monitors = response.data.data.monitors
|
|
1187
|
+ this.summary = response.data.data.summary
|
|
1188
|
+ this.org_template_info = response.data.data.org_template_info
|
|
1189
|
+ if (this.monitors.length < 8) {
|
|
1190
|
+ var nl = 8 - this.monitors.length
|
|
1191
|
+ for (let index = 0; index < nl; index++) {
|
|
1192
|
+ if (this.monitors[index] == undefined || this.monitors[index].length <= 0) {
|
1193
|
1193
|
this.monitors.push([])
|
1194
|
|
- } else{
|
1195
|
|
- continue
|
1196
|
|
- }
|
|
1194
|
+ } else {
|
|
1195
|
+ continue
|
1197
|
1196
|
}
|
1198
|
1197
|
}
|
|
1198
|
+ }
|
1199
|
1199
|
|
1200
|
|
- if(this.monitors.length > 15){
|
1201
|
|
- const tempMonitors = []
|
1202
|
|
- const tempMonitors2 = []
|
1203
|
|
- for (let index = 0;index < this.monitors.length;index++){
|
1204
|
|
- if(index < 15) {
|
1205
|
|
- tempMonitors.push(this.monitors[index])
|
1206
|
|
- } else {
|
1207
|
|
- tempMonitors2.push(this.monitors[index])
|
1208
|
|
- }
|
|
1200
|
+ if (this.monitors.length > 15) {
|
|
1201
|
+ const tempMonitors = []
|
|
1202
|
+ const tempMonitors2 = []
|
|
1203
|
+ for (let index = 0; index < this.monitors.length; index++) {
|
|
1204
|
+ if (index < 15) {
|
|
1205
|
+ tempMonitors.push(this.monitors[index])
|
|
1206
|
+ } else {
|
|
1207
|
+ tempMonitors2.push(this.monitors[index])
|
1209
|
1208
|
}
|
1210
|
|
- this.monitors = tempMonitors
|
1211
|
|
- this.monitors2 = tempMonitors2
|
1212
|
1209
|
}
|
|
1210
|
+ this.monitors = tempMonitors
|
|
1211
|
+ this.monitors2 = tempMonitors2
|
|
1212
|
+ }
|
1213
|
1213
|
|
|
1214
|
+ this.jilurow = this.monitors.length + 1
|
1214
|
1215
|
|
|
1216
|
+ this.advice_jilurow = this.advices.length + 1
|
1215
|
1217
|
|
1216
|
|
-
|
1217
|
|
-
|
1218
|
|
- this.jilurow = this.monitors.length + 1
|
1219
|
|
-
|
1220
|
|
- this.advice_jilurow = this.advices.length + 1
|
1221
|
|
-
|
1222
|
|
- var childMap = {}
|
1223
|
|
- for (const index in this.advices) {
|
1224
|
|
- if (this.advices[index].parent_id == 0) {
|
1225
|
|
- continue
|
1226
|
|
- }
|
1227
|
|
- if (!(this.advices[index].parent_id in childMap)) {
|
1228
|
|
- childMap[this.advices[index].parent_id] = []
|
1229
|
|
- }
|
1230
|
|
- childMap[this.advices[index].parent_id].push(this.advices[index])
|
|
1218
|
+ var childMap = {}
|
|
1219
|
+ for (const index in this.advices) {
|
|
1220
|
+ if (this.advices[index].parent_id == 0) {
|
|
1221
|
+ continue
|
|
1222
|
+ }
|
|
1223
|
+ if (!(this.advices[index].parent_id in childMap)) {
|
|
1224
|
+ childMap[this.advices[index].parent_id] = []
|
1231
|
1225
|
}
|
|
1226
|
+ childMap[this.advices[index].parent_id].push(this.advices[index])
|
|
1227
|
+ }
|
1232
|
1228
|
|
1233
|
|
- var advices = []
|
1234
|
|
- for (const index in this.advices) {
|
1235
|
|
- if (this.advices[index].parent_id > 0) {
|
1236
|
|
- continue
|
1237
|
|
- }
|
1238
|
|
- var item = this.advices[index]
|
1239
|
|
- if (item.id in childMap) {
|
1240
|
|
- item.children = childMap[item.id]
|
1241
|
|
- } else {
|
1242
|
|
- item.children = []
|
1243
|
|
- }
|
1244
|
|
- advices.push(item)
|
|
1229
|
+ var advices = []
|
|
1230
|
+ for (const index in this.advices) {
|
|
1231
|
+ if (this.advices[index].parent_id > 0) {
|
|
1232
|
+ continue
|
1245
|
1233
|
}
|
|
1234
|
+ var item = this.advices[index]
|
|
1235
|
+ if (item.id in childMap) {
|
|
1236
|
+ item.children = childMap[item.id]
|
|
1237
|
+ } else {
|
|
1238
|
+ item.children = []
|
|
1239
|
+ }
|
|
1240
|
+ advices.push(item)
|
|
1241
|
+ }
|
1246
|
1242
|
|
1247
|
|
- var leftAdvice = []
|
1248
|
|
- var rightAdvice = []
|
1249
|
|
- var adlen = advices.length
|
|
1243
|
+ var leftAdvice = []
|
|
1244
|
+ var rightAdvice = []
|
|
1245
|
+ var adlen = advices.length
|
1250
|
1246
|
|
1251
|
|
- var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
|
1252
|
|
- for (var i = 0; i < halfLen; i++) {
|
1253
|
|
- leftAdvice.push(advices[i])
|
1254
|
|
- rightAdvice.push(advices[i + halfLen])
|
|
1247
|
+ var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
|
|
1248
|
+ for (var i = 0; i < halfLen; i++) {
|
|
1249
|
+ leftAdvice.push(advices[i])
|
|
1250
|
+ rightAdvice.push(advices[i + halfLen])
|
|
1251
|
+ }
|
|
1252
|
+ if (halfLen < 5) {
|
|
1253
|
+ var nl = 5 - leftAdvice.length
|
|
1254
|
+ for (let index = 0; index < nl; index++) {
|
|
1255
|
+ leftAdvice.push([])
|
1255
|
1256
|
}
|
1256
|
|
- if (halfLen < 5) {
|
1257
|
|
- var nl = 5 - leftAdvice.length
|
1258
|
|
- for (let index = 0; index < nl; index++) {
|
1259
|
|
- leftAdvice.push([])
|
1260
|
|
- }
|
1261
|
|
- var nl = 5 - rightAdvice.length
|
1262
|
|
- for (let index = 0; index < nl; index++) {
|
1263
|
|
- rightAdvice.push([])
|
1264
|
|
- }
|
|
1257
|
+ var nl = 5 - rightAdvice.length
|
|
1258
|
+ for (let index = 0; index < nl; index++) {
|
|
1259
|
+ rightAdvice.push([])
|
1265
|
1260
|
}
|
|
1261
|
+ }
|
1266
|
1262
|
|
1267
|
|
- this.advices = []
|
1268
|
|
- for (var i = 0; i < halfLen; i++) {
|
1269
|
|
- var item = []
|
1270
|
|
- item.push(leftAdvice[i])
|
1271
|
|
- item.push(rightAdvice[i])
|
1272
|
|
- this.advices.push(item)
|
1273
|
|
- }
|
1274
|
|
- this.loading = false
|
|
1263
|
+ this.advices = []
|
|
1264
|
+ for (var i = 0; i < halfLen; i++) {
|
|
1265
|
+ var item = []
|
|
1266
|
+ item.push(leftAdvice[i])
|
|
1267
|
+ item.push(rightAdvice[i])
|
|
1268
|
+ this.advices.push(item)
|
|
1269
|
+ }
|
|
1270
|
+ this.loading = false
|
1275
|
1271
|
|
1276
|
|
- this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
|
1272
|
+ this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
|
1273
|
+
|
|
1274
|
+ for (let index = 0; index < this.doctor_advices.length; index++) {
|
|
1275
|
+ this.doctor_advices[index]['isShow'] = 2
|
|
1276
|
+ }
|
1277
|
1277
|
|
1278
|
|
- for (let index = 0; index < this.doctor_advices.length; index++) {
|
1279
|
|
- this.doctor_advices[index]['isShow'] = 2
|
|
1278
|
+ if (this.doctor_advices.length > 0) {
|
|
1279
|
+ var group = this.newAdviceGroupObject()
|
|
1280
|
+ var initGroupBlock = function(group, advice) {
|
|
1281
|
+ group.group_no = advice.groupno
|
1280
|
1282
|
}
|
|
1283
|
+ for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
|
|
1284
|
+ var new_advice_index = 0
|
|
1285
|
+
|
|
1286
|
+ if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
|
|
1287
|
+ new_advice_index = index + this.doctor_advices[index].children.length + 1
|
|
1288
|
+
|
|
1289
|
+ var doctor_advice = {
|
|
1290
|
+ delivery_way: this.doctor_advices[index].delivery_way,
|
|
1291
|
+ execution_frequency: this.doctor_advices[index].execution_frequency,
|
|
1292
|
+ groupno: this.doctor_advices[index].groupno,
|
|
1293
|
+ id: this.doctor_advices[index].id,
|
|
1294
|
+ parent_id: this.doctor_advices[index].parent_id,
|
|
1295
|
+ children: this.doctor_advices[index].children,
|
|
1296
|
+ remark: this.doctor_advices[index].remark,
|
|
1297
|
+ execution_staff: this.doctor_advices[index].execution_staff,
|
|
1298
|
+ checker: this.doctor_advices[index].checker,
|
|
1299
|
+ execution_time: this.doctor_advices[index].execution_time,
|
|
1300
|
+ advice_doctor: this.doctor_advices[index].advice_doctor
|
1281
|
1301
|
|
1282
|
|
- if (this.doctor_advices.length > 0) {
|
1283
|
|
- var group = this.newAdviceGroupObject()
|
1284
|
|
- var initGroupBlock = function(group, advice) {
|
1285
|
|
- group.group_no = advice.groupno
|
|
1302
|
+ }
|
|
1303
|
+ doctor_advice['isShow'] = 1
|
|
1304
|
+ this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
|
|
1305
|
+ // this.doctor_advices.push(doctor_advice)
|
1286
|
1306
|
}
|
1287
|
|
- for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
|
1288
|
|
- var new_advice_index = 0
|
1289
|
|
-
|
1290
|
|
- if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
|
1291
|
|
- new_advice_index = index + this.doctor_advices[index].children.length + 1
|
1292
|
|
-
|
1293
|
|
- var doctor_advice = {
|
1294
|
|
- delivery_way: this.doctor_advices[index].delivery_way,
|
1295
|
|
- execution_frequency: this.doctor_advices[index].execution_frequency,
|
1296
|
|
- groupno: this.doctor_advices[index].groupno,
|
1297
|
|
- id: this.doctor_advices[index].id,
|
1298
|
|
- parent_id: this.doctor_advices[index].parent_id,
|
1299
|
|
- children: this.doctor_advices[index].children,
|
1300
|
|
- remark: this.doctor_advices[index].remark,
|
1301
|
|
- execution_staff: this.doctor_advices[index].execution_staff,
|
1302
|
|
- checker: this.doctor_advices[index].checker,
|
1303
|
|
- execution_time: this.doctor_advices[index].execution_time,
|
1304
|
|
- advice_doctor: this.doctor_advices[index].advice_doctor,
|
|
1307
|
+ }
|
1305
|
1308
|
|
|
1309
|
+ var templength = 0
|
|
1310
|
+ if (this.doctor_advices.length > 12) {
|
|
1311
|
+ templength = 12
|
|
1312
|
+ } else {
|
|
1313
|
+ templength = this.doctor_advices.length
|
|
1314
|
+ }
|
|
1315
|
+ for (let index = 0; index < templength; index++) {
|
|
1316
|
+ const advice = this.doctor_advices[index]
|
|
1317
|
+ if (advice.groupno == 0) {
|
|
1318
|
+ // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
|
1319
|
+ if (advice.parent_id > 0) {
|
|
1320
|
+ if (this.advice_groups.length > 0) {
|
|
1321
|
+ var parent_group = this.advice_groups[
|
|
1322
|
+ this.advice_groups.length - 1
|
|
1323
|
+ ]
|
|
1324
|
+ if (parent_group.advices.length > 0) {
|
|
1325
|
+ if (parent_group.advices[0].id == advice.parent_id) {
|
|
1326
|
+ parent_group.advices.push(advice)
|
|
1327
|
+ }
|
|
1328
|
+ }
|
|
1329
|
+ }
|
|
1330
|
+ continue
|
|
1331
|
+ } else {
|
|
1332
|
+ if (group.group_no > 0) {
|
|
1333
|
+ this.advice_groups.push(group)
|
|
1334
|
+ group = this.newAdviceGroupObject()
|
1306
|
1335
|
}
|
1307
|
|
- doctor_advice['isShow'] = 1
|
1308
|
|
- this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
|
1309
|
|
- // this.doctor_advices.push(doctor_advice)
|
|
1336
|
+
|
|
1337
|
+ initGroupBlock(group, advice)
|
|
1338
|
+ group.advices.push(advice)
|
|
1339
|
+ this.advice_groups.push(group)
|
|
1340
|
+ group = this.newAdviceGroupObject()
|
|
1341
|
+ continue
|
1310
|
1342
|
}
|
1311
|
1343
|
}
|
1312
|
1344
|
|
1313
|
|
- var templength = 0
|
1314
|
|
- if (this.doctor_advices.length > 12) {
|
1315
|
|
- templength = 12
|
1316
|
|
- } else {
|
1317
|
|
- templength = this.doctor_advices.length
|
|
1345
|
+ if (group.group_no > 0 && group.group_no != advice.groupno) {
|
|
1346
|
+ this.advice_groups.push(group)
|
|
1347
|
+ group = this.newAdviceGroupObject()
|
|
1348
|
+ }
|
|
1349
|
+ if (group.group_no == 0) {
|
|
1350
|
+ initGroupBlock(group, advice)
|
1318
|
1351
|
}
|
1319
|
|
- for (let index = 0; index < templength; index++) {
|
|
1352
|
+ if (group.group_no == advice.groupno) {
|
|
1353
|
+ group.advices.push(advice)
|
|
1354
|
+ }
|
|
1355
|
+ if (index == 11) {
|
|
1356
|
+ this.advice_groups.push(group)
|
|
1357
|
+ group = this.newAdviceGroupObject()
|
|
1358
|
+ }
|
|
1359
|
+ }
|
|
1360
|
+
|
|
1361
|
+ if (this.doctor_advices.length > 12) {
|
|
1362
|
+ for (let index = 12; index < this.doctor_advices.length; index++) {
|
1320
|
1363
|
const advice = this.doctor_advices[index]
|
1321
|
1364
|
if (advice.groupno == 0) {
|
1322
|
1365
|
// 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
1323
|
1366
|
if (advice.parent_id > 0) {
|
1324
|
|
- if (this.advice_groups.length > 0) {
|
1325
|
|
- var parent_group = this.advice_groups[
|
1326
|
|
- this.advice_groups.length - 1
|
|
1367
|
+ if (this.advice_groups_2.length > 0) {
|
|
1368
|
+ var parent_group = this.advice_groups_2[
|
|
1369
|
+ this.advice_groups_2.length - 1
|
1327
|
1370
|
]
|
1328
|
1371
|
if (parent_group.advices.length > 0) {
|
1329
|
1372
|
if (parent_group.advices[0].id == advice.parent_id) {
|
|
@@ -1334,20 +1377,20 @@
|
1334
|
1377
|
continue
|
1335
|
1378
|
} else {
|
1336
|
1379
|
if (group.group_no > 0) {
|
1337
|
|
- this.advice_groups.push(group)
|
|
1380
|
+ this.advice_groups_2.push(group)
|
1338
|
1381
|
group = this.newAdviceGroupObject()
|
1339
|
1382
|
}
|
1340
|
1383
|
|
1341
|
1384
|
initGroupBlock(group, advice)
|
1342
|
1385
|
group.advices.push(advice)
|
1343
|
|
- this.advice_groups.push(group)
|
|
1386
|
+ this.advice_groups_2.push(group)
|
1344
|
1387
|
group = this.newAdviceGroupObject()
|
1345
|
1388
|
continue
|
1346
|
1389
|
}
|
1347
|
1390
|
}
|
1348
|
1391
|
|
1349
|
1392
|
if (group.group_no > 0 && group.group_no != advice.groupno) {
|
1350
|
|
- this.advice_groups.push(group)
|
|
1393
|
+ this.advice_groups_2.push(group)
|
1351
|
1394
|
group = this.newAdviceGroupObject()
|
1352
|
1395
|
}
|
1353
|
1396
|
if (group.group_no == 0) {
|
|
@@ -1356,69 +1399,22 @@
|
1356
|
1399
|
if (group.group_no == advice.groupno) {
|
1357
|
1400
|
group.advices.push(advice)
|
1358
|
1401
|
}
|
1359
|
|
- if(index == 11 ) {
|
1360
|
|
- this.advice_groups.push(group)
|
1361
|
|
- group = this.newAdviceGroupObject()
|
1362
|
|
- }
|
1363
|
1402
|
}
|
1364
|
|
-
|
1365
|
|
- if(this.doctor_advices.length > 12){
|
1366
|
|
- for (let index = 12; index < this.doctor_advices.length; index++) {
|
1367
|
|
- const advice = this.doctor_advices[index]
|
1368
|
|
- if (advice.groupno == 0) {
|
1369
|
|
- // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
1370
|
|
- if (advice.parent_id > 0) {
|
1371
|
|
- if (this.advice_groups_2.length > 0) {
|
1372
|
|
- var parent_group = this.advice_groups_2[
|
1373
|
|
- this.advice_groups_2.length - 1
|
1374
|
|
- ]
|
1375
|
|
- if (parent_group.advices.length > 0) {
|
1376
|
|
- if (parent_group.advices[0].id == advice.parent_id) {
|
1377
|
|
- parent_group.advices.push(advice)
|
1378
|
|
- }
|
1379
|
|
- }
|
1380
|
|
- }
|
1381
|
|
- continue
|
1382
|
|
- } else {
|
1383
|
|
- if (group.group_no > 0) {
|
1384
|
|
- this.advice_groups_2.push(group)
|
1385
|
|
- group = this.newAdviceGroupObject()
|
1386
|
|
- }
|
1387
|
|
-
|
1388
|
|
- initGroupBlock(group, advice)
|
1389
|
|
- group.advices.push(advice)
|
1390
|
|
- this.advice_groups_2.push(group)
|
1391
|
|
- group = this.newAdviceGroupObject()
|
1392
|
|
- continue
|
1393
|
|
- }
|
1394
|
|
- }
|
1395
|
|
-
|
1396
|
|
- if (group.group_no > 0 && group.group_no != advice.groupno) {
|
1397
|
|
- this.advice_groups_2.push(group)
|
1398
|
|
- group = this.newAdviceGroupObject()
|
1399
|
|
- }
|
1400
|
|
- if (group.group_no == 0) {
|
1401
|
|
- initGroupBlock(group, advice)
|
1402
|
|
- }
|
1403
|
|
- if (group.group_no == advice.groupno) {
|
1404
|
|
- group.advices.push(advice)
|
1405
|
|
- }
|
1406
|
|
- }
|
1407
|
|
- }
|
1408
|
|
- if (group.group_no > 0) {
|
1409
|
|
- // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
1410
|
|
- if (this.doctor_advices.length > 10) {
|
1411
|
|
- this.advice_groups_2.push(group)
|
1412
|
|
- } else{
|
1413
|
|
- this.advice_groups.push(group)
|
1414
|
|
- }
|
|
1403
|
+ }
|
|
1404
|
+ if (group.group_no > 0) {
|
|
1405
|
+ // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
|
1406
|
+ if (this.doctor_advices.length > 10) {
|
|
1407
|
+ this.advice_groups_2.push(group)
|
|
1408
|
+ } else {
|
|
1409
|
+ this.advice_groups.push(group)
|
1415
|
1410
|
}
|
1416
|
1411
|
}
|
1417
|
|
- } else {
|
1418
|
|
- this.loading = false
|
1419
|
|
- this.$message.error('请求数据失败')
|
1420
|
|
- return false
|
1421
|
1412
|
}
|
|
1413
|
+ } else {
|
|
1414
|
+ this.loading = false
|
|
1415
|
+ this.$message.error('请求数据失败')
|
|
1416
|
+ return false
|
|
1417
|
+ }
|
1422
|
1418
|
// })
|
1423
|
1419
|
},
|
1424
|
1420
|
bloodAccessParOperaName(id) {
|
|
@@ -1455,24 +1451,23 @@
|
1455
|
1451
|
// checker: 0,
|
1456
|
1452
|
}
|
1457
|
1453
|
)
|
1458
|
|
- },getFloat: function(x) {
|
|
1454
|
+ }, getFloat: function(x) {
|
1459
|
1455
|
if (x != '.') {
|
1460
|
|
- var f = Math.round(x * 100) / 100;
|
1461
|
|
- var s = f.toString();
|
1462
|
|
- var rs = s.indexOf('.');
|
|
1456
|
+ var f = Math.round(x * 100) / 100
|
|
1457
|
+ var s = f.toString()
|
|
1458
|
+ var rs = s.indexOf('.')
|
1463
|
1459
|
if (rs <= 0) {
|
1464
|
|
- rs = s.length;
|
1465
|
|
- s += '.';
|
|
1460
|
+ rs = s.length
|
|
1461
|
+ s += '.'
|
1466
|
1462
|
}
|
1467
|
1463
|
while (s.length <= rs + 1) {
|
1468
|
|
- s += '0';
|
|
1464
|
+ s += '0'
|
1469
|
1465
|
}
|
1470
|
|
- return s;
|
|
1466
|
+ return s
|
1471
|
1467
|
} else {
|
1472
|
|
- return '0.0';
|
|
1468
|
+ return '0.0'
|
1473
|
1469
|
}
|
1474
|
|
-
|
1475
|
|
- },
|
|
1470
|
+ }
|
1476
|
1471
|
},
|
1477
|
1472
|
watch: {
|
1478
|
1473
|
'patientInfo.gender': function() {
|