|
@@ -62,8 +62,7 @@
|
62
|
62
|
</el-table-column>
|
63
|
63
|
<el-table-column prop="mode_id" label="透析模式">
|
64
|
64
|
<template slot-scope="scope">
|
65
|
|
- <!--<span>{{ scope.row.mode_id.join("、") }}</span>-->
|
66
|
|
- <span>{{scope.row.patient_id}}</span>
|
|
65
|
+ <span>{{ scope.row.child.join("、") }}</span>
|
67
|
66
|
</template>
|
68
|
67
|
</el-table-column>
|
69
|
68
|
<el-table-column prop="address" label="透析总次数" width="140">
|
|
@@ -146,171 +145,155 @@ export default {
|
146
|
145
|
getDialysisList(){
|
147
|
146
|
getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
|
148
|
147
|
if(response.data.state === 1){
|
149
|
|
- var dialysislist = response.data.data.dialysislist
|
150
|
|
- for(let i=0;i<dialysislist.length;i++){
|
151
|
|
- if(dialysislist[i].mode_id == 1){
|
152
|
|
- dialysislist[i].mode_id = "HD"
|
153
|
|
- }
|
154
|
|
- if(dialysislist[i].mode_id == 2){
|
155
|
|
- dialysislist[i].mode_id = "HDF"
|
156
|
|
- }
|
157
|
|
- if(dialysislist[i].mode_id == 3){
|
158
|
|
- dialysislist[i].mode_id = "HD+HP"
|
159
|
|
- }
|
160
|
|
- if(dialysislist[i].mode_id == 4){
|
161
|
|
- dialysislist[i].mode_id = "HP"
|
162
|
|
- }
|
163
|
|
- if(dialysislist[i].mode_id == 5){
|
164
|
|
- dialysislist[i].mode_id = "HF"
|
165
|
|
- }
|
166
|
|
- if(dialysislist[i].mode_id == 6){
|
167
|
|
- dialysislist[i].mode_id = "SCUF"
|
168
|
|
- }
|
169
|
|
- if(dialysislist[i].mode_id == 7){
|
170
|
|
- dialysislist[i].mode_id = "IUF"
|
171
|
|
- }
|
172
|
|
- if(dialysislist[i].mode_id == 8){
|
173
|
|
- dialysislist[i].mode_id = "HFHD"
|
174
|
|
- }
|
175
|
|
- if(dialysislist[i].mode_id == 9){
|
176
|
|
- dialysislist[i].mode_id = "HFHD+HP"
|
177
|
|
- }
|
178
|
|
- if(dialysislist[i].mode_id == 10){
|
179
|
|
- dialysislist[i].mode_id = "PHF"
|
180
|
|
- }
|
181
|
|
- if(dialysislist[i].mode_id == 11){
|
182
|
|
- dialysislist[i].mode_id = "HFR"
|
183
|
|
- }
|
184
|
|
- if(dialysislist[i].mode_id == 12){
|
185
|
|
- dialysislist[i].mode_id = "HDF+HP"
|
186
|
|
- }
|
187
|
|
- if(dialysislist[i].mode_id == 13){
|
188
|
|
- dialysislist[i].mode_id = "CRRT"
|
189
|
|
- }
|
190
|
|
- if(dialysislist[i].mode_id == 14){
|
191
|
|
- dialysislist[i].mode_id = "腹水回输"
|
192
|
|
- }
|
193
|
|
- if(dialysislist[i].mode_id == 19){
|
194
|
|
- dialysislist[i].mode_id = "IUF+HD"
|
|
148
|
+ // var dialysislist = response.data.data.dialysislist
|
|
149
|
+ // for(let i=0;i<dialysislist.length;i++){
|
|
150
|
+ // if(dialysislist[i].mode_id == 1){
|
|
151
|
+ // dialysislist[i].mode_id = "HD"
|
|
152
|
+ // }
|
|
153
|
+ // if(dialysislist[i].mode_id == 2){
|
|
154
|
+ // dialysislist[i].mode_id = "HDF"
|
|
155
|
+ // }
|
|
156
|
+ // if(dialysislist[i].mode_id == 3){
|
|
157
|
+ // dialysislist[i].mode_id = "HD+HP"
|
|
158
|
+ // }
|
|
159
|
+ // if(dialysislist[i].mode_id == 4){
|
|
160
|
+ // dialysislist[i].mode_id = "HP"
|
|
161
|
+ // }
|
|
162
|
+ // if(dialysislist[i].mode_id == 5){
|
|
163
|
+ // dialysislist[i].mode_id = "HF"
|
|
164
|
+ // }
|
|
165
|
+ // if(dialysislist[i].mode_id == 6){
|
|
166
|
+ // dialysislist[i].mode_id = "SCUF"
|
|
167
|
+ // }
|
|
168
|
+ // if(dialysislist[i].mode_id == 7){
|
|
169
|
+ // dialysislist[i].mode_id = "IUF"
|
|
170
|
+ // }
|
|
171
|
+ // if(dialysislist[i].mode_id == 8){
|
|
172
|
+ // dialysislist[i].mode_id = "HFHD"
|
|
173
|
+ // }
|
|
174
|
+ // if(dialysislist[i].mode_id == 9){
|
|
175
|
+ // dialysislist[i].mode_id = "HFHD+HP"
|
|
176
|
+ // }
|
|
177
|
+ // if(dialysislist[i].mode_id == 10){
|
|
178
|
+ // dialysislist[i].mode_id = "PHF"
|
|
179
|
+ // }
|
|
180
|
+ // if(dialysislist[i].mode_id == 11){
|
|
181
|
+ // dialysislist[i].mode_id = "HFR"
|
|
182
|
+ // }
|
|
183
|
+ // if(dialysislist[i].mode_id == 12){
|
|
184
|
+ // dialysislist[i].mode_id = "HDF+HP"
|
|
185
|
+ // }
|
|
186
|
+ // if(dialysislist[i].mode_id == 13){
|
|
187
|
+ // dialysislist[i].mode_id = "CRRT"
|
|
188
|
+ // }
|
|
189
|
+ // if(dialysislist[i].mode_id == 14){
|
|
190
|
+ // dialysislist[i].mode_id = "腹水回输"
|
|
191
|
+ // }
|
|
192
|
+ // if(dialysislist[i].mode_id == 19){
|
|
193
|
+ // dialysislist[i].mode_id = "IUF+HD"
|
|
194
|
+ // }
|
|
195
|
+ // }
|
|
196
|
+ // console.log("dialysislist",dialysislist)
|
|
197
|
+ // var hash = {};
|
|
198
|
+ // var i = 0;
|
|
199
|
+ // var res = [];
|
|
200
|
+ // dialysislist.forEach(function(item) {
|
|
201
|
+ // var patient_id = item.patient_id;
|
|
202
|
+ // hash[patient_id] ? res[hash[patient_id] - 1].mode_id.push(item.mode_id) : hash[patient_id] = ++i && res.push({
|
|
203
|
+ // mode_id: [item.mode_id],
|
|
204
|
+ // patient_id: patient_id,
|
|
205
|
+ // dialysis_no: item.dialysis_no,
|
|
206
|
+ // name:item.name,
|
|
207
|
+ // age:item.id_card_no,
|
|
208
|
+ // total_dialysis:item.total_dialysis,
|
|
209
|
+ // user_sys_before_count:item.user_sys_before_count,
|
|
210
|
+ // })
|
|
211
|
+ // });
|
|
212
|
+ // res.map(item => {
|
|
213
|
+ // item.age = this.getAge(item.age)
|
|
214
|
+ // })
|
|
215
|
+ // console.log(res)
|
|
216
|
+ // //this.DialysisData = res
|
|
217
|
+
|
|
218
|
+ // var total = response.data.data.total
|
|
219
|
+ // console.log("total",total)
|
|
220
|
+ // // this.total = total
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+ var list = response.data.data.list
|
|
224
|
+ console.log("list",list)
|
|
225
|
+ var totallist = response.data.data.totallist
|
|
226
|
+ console.log("totallist",totallist)
|
|
227
|
+ this.total = totallist
|
|
228
|
+ var prescriptionList = response.data.data.prescriptionList
|
|
229
|
+ for(let i=0;i<prescriptionList.length;i++){
|
|
230
|
+ if(prescriptionList[i].mode_id == 1){
|
|
231
|
+ prescriptionList[i].mode_id = "HD"
|
|
232
|
+ }else if(prescriptionList[i].mode_id == 2){
|
|
233
|
+ prescriptionList[i].mode_id = "HDF"
|
|
234
|
+ }else if(prescriptionList[i].mode_id == 3){
|
|
235
|
+ prescriptionList[i].mode_id = "HD+HP"
|
|
236
|
+ }else if(prescriptionList[i].mode_id == 4){
|
|
237
|
+ prescriptionList[i].mode_id = "HP"
|
|
238
|
+ }else if(prescriptionList[i].mode_id == 5){
|
|
239
|
+ prescriptionList[i].mode_id = "HF"
|
|
240
|
+ }else if(prescriptionList[i].mode_id == 6){
|
|
241
|
+ prescriptionList[i].mode_id = "SCUF"
|
|
242
|
+ }else if(prescriptionList[i].mode_id == 7){
|
|
243
|
+ prescriptionList[i].mode_id = "IUF"
|
|
244
|
+ }else if(prescriptionList[i].mode_id == 8){
|
|
245
|
+ prescriptionList[i].mode_id = "HFHD"
|
|
246
|
+ }else if(prescriptionList[i].mode_id == 9){
|
|
247
|
+ prescriptionList[i].mode_id = "HFHD+HP"
|
|
248
|
+ }else if(prescriptionList[i].mode_id == 10){
|
|
249
|
+ prescriptionList[i].mode_id = "PHF"
|
|
250
|
+ }else if(prescriptionList[i].mode_id == 11){
|
|
251
|
+ prescriptionList[i].mode_id = "HFR"
|
|
252
|
+ }else if(prescriptionList[i].mode_id == 12){
|
|
253
|
+ prescriptionList[i].mode_id = "HDF+HP"
|
|
254
|
+ }else if(prescriptionList[i].mode_id == 13){
|
|
255
|
+ prescriptionList[i].mode_id = "CRRT"
|
|
256
|
+ }else if(prescriptionList[i].mode_id == 14){
|
|
257
|
+ prescriptionList[i].mode_id = "腹水回输"
|
|
258
|
+ }else if(prescriptionList[i].mode_id == 19){
|
|
259
|
+ prescriptionList[i].mode_id = "IUF+HD"
|
|
260
|
+ }
|
|
261
|
+ }
|
|
262
|
+
|
|
263
|
+ console.log("prescriptionList",prescriptionList)
|
|
264
|
+ for(let i=0;i<this.prescriptionList.length;i++){
|
|
265
|
+ for(let j=0;j<list.length;j++){
|
|
266
|
+ if(this.prescriptionList[i].patient_id == list[j].patient_id){
|
|
267
|
+ arr.push(this.prescriptionList[i])
|
195
|
268
|
}
|
196
|
|
- }
|
197
|
|
- console.log("dialysislist",dialysislist)
|
198
|
|
- var hash = {};
|
199
|
|
- var i = 0;
|
200
|
|
- var res = [];
|
201
|
|
- dialysislist.forEach(function(item) {
|
202
|
|
- var patient_id = item.patient_id;
|
203
|
|
- hash[patient_id] ? res[hash[patient_id] - 1].mode_id.push(item.mode_id) : hash[patient_id] = ++i && res.push({
|
204
|
|
- mode_id: [item.mode_id],
|
205
|
|
- patient_id: patient_id,
|
206
|
|
- dialysis_no: item.dialysis_no,
|
|
269
|
+ }
|
|
270
|
+ }
|
|
271
|
+ let dataInfo = {}
|
|
272
|
+ list.forEach((item, index) => {
|
|
273
|
+ let { patient_id } = item
|
|
274
|
+ if (!dataInfo[patient_id]) {
|
|
275
|
+ dataInfo[patient_id] = {
|
|
276
|
+ patient_id,
|
207
|
277
|
name:item.name,
|
208
|
|
- age:item.id_card_no,
|
|
278
|
+ id_card_no:item.id_card_no,
|
|
279
|
+ dialysis_no:item.dialysis_no,
|
209
|
280
|
total_dialysis:item.total_dialysis,
|
210
|
281
|
user_sys_before_count:item.user_sys_before_count,
|
211
|
|
- })
|
212
|
|
- });
|
213
|
|
- res.map(item => {
|
214
|
|
- item.age = this.getAge(item.age)
|
215
|
|
- })
|
216
|
|
- console.log(res)
|
217
|
|
- //this.DialysisData = res
|
218
|
|
-
|
219
|
|
- var total = response.data.data.total
|
220
|
|
- console.log("total",total)
|
221
|
|
- // this.total = total
|
222
|
|
-
|
223
|
|
- var list = response.data.data.list
|
224
|
|
- for(let i=0;i<list.length;i++){
|
225
|
|
- if(list[i].mode_id == 1){
|
226
|
|
- list[i].mode_id = "HD"
|
227
|
|
- }
|
228
|
|
- if(list[i].mode_id == 2){
|
229
|
|
- list[i].mode_id = "HDF"
|
230
|
|
- }
|
231
|
|
- if(list[i].mode_id == 3){
|
232
|
|
- list[i].mode_id = "HD+HP"
|
233
|
|
- }
|
234
|
|
- if(list[i].mode_id == 4){
|
235
|
|
- list[i].mode_id = "HP"
|
236
|
|
- }
|
237
|
|
- if(list[i].mode_id == 5){
|
238
|
|
- list[i].mode_id = "HF"
|
239
|
|
- }
|
240
|
|
- if(list[i].mode_id == 6){
|
241
|
|
- list[i].mode_id = "SCUF"
|
242
|
|
- }
|
243
|
|
- if(list[i].mode_id == 7){
|
244
|
|
- list[i].mode_id = "IUF"
|
245
|
|
- }
|
246
|
|
- if(list[i].mode_id == 8){
|
247
|
|
- list[i].mode_id = "HFHD"
|
248
|
|
- }
|
249
|
|
- if(list[i].mode_id == 9){
|
250
|
|
- list[i].mode_id = "HFHD+HP"
|
|
282
|
+ child: []
|
251
|
283
|
}
|
252
|
|
- if(list[i].mode_id == 10){
|
253
|
|
- list[i].mode_id = "PHF"
|
254
|
|
- }
|
255
|
|
- if(list[i].mode_id == 11){
|
256
|
|
- list[i].mode_id = "HFR"
|
257
|
|
- }
|
258
|
|
- if(list[i].mode_id == 12){
|
259
|
|
- list[i].mode_id = "HDF+HP"
|
260
|
|
- }
|
261
|
|
- if(list[i].mode_id == 13){
|
262
|
|
- list[i].mode_id = "CRRT"
|
263
|
|
- }
|
264
|
|
- if(list[i].mode_id == 14){
|
265
|
|
- list[i].mode_id = "腹水回输"
|
266
|
|
- }
|
267
|
|
- if(list[i].mode_id == 19){
|
268
|
|
- list[i].mode_id = "IUF+HD"
|
269
|
|
- }
|
270
|
|
- }
|
271
|
|
- console.log("list",list)
|
272
|
|
-
|
273
|
|
- var totallist = response.data.data.totallist
|
274
|
|
- console.log("totallist",totallist)
|
275
|
|
- this.total = totallist
|
276
|
|
- var prescriptionList = response.data.data.prescriptionList
|
277
|
|
-
|
278
|
|
- console.log("prescriptionList",prescriptionList)
|
279
|
|
- for(let i=0;i<this.prescriptionList.length;i++){
|
280
|
|
- for(let j=0;j<list.length;j++){
|
281
|
|
- if(this.prescriptionList[i].patient_id == list[j].patient_id){
|
282
|
|
- arr.push(this.prescriptionList[i])
|
283
|
|
- }
|
284
|
|
- }
|
285
|
284
|
}
|
286
|
|
- let dataInfo = {}
|
287
|
|
- list.forEach((item, index) => {
|
288
|
|
- let { patient_id } = item
|
289
|
|
- if (!dataInfo[patient_id]) {
|
290
|
|
- dataInfo[patient_id] = {
|
291
|
|
- patient_id,
|
292
|
|
- name:item.name,
|
293
|
|
- id_card_no:item.id_card_no,
|
294
|
|
- dialysis_no:item.dialysis_no,
|
295
|
|
- total_dialysis:item.total_dialysis,
|
296
|
|
- user_sys_before_count:item.user_sys_before_count,
|
297
|
|
- child: []
|
298
|
|
- }
|
299
|
|
- }
|
300
|
|
- })
|
301
|
|
- let list = Object.values(dataInfo)
|
302
|
|
- console.log("arr",list)
|
303
|
|
- list.map(item => {
|
304
|
|
- for (let i = 0; i < prescriptionList.length; i++) {
|
305
|
|
- if (
|
306
|
|
- item.patient_id === prescriptionList[i].patient_id
|
307
|
|
- ) {
|
308
|
|
- item.child.push(prescriptionList[i])
|
309
|
|
- }
|
|
285
|
+ })
|
|
286
|
+ let list = Object.values(dataInfo)
|
|
287
|
+ console.log("arr",list)
|
|
288
|
+ list.map(item => {
|
|
289
|
+ for (let i = 0; i < prescriptionList.length; i++) {
|
|
290
|
+ if (item.patient_id === prescriptionList[i].patient_id) {
|
|
291
|
+ item.child.push(prescriptionList[i].mode_id)
|
310
|
292
|
}
|
311
|
|
- })
|
312
|
|
- console.log("list---",list)
|
313
|
|
- this.DialysisData = list
|
|
293
|
+ }
|
|
294
|
+ })
|
|
295
|
+ console.log("list---",list)
|
|
296
|
+ this.DialysisData = list
|
314
|
297
|
}
|
315
|
298
|
})
|
316
|
299
|
},
|