|
@@ -43,7 +43,7 @@
|
43
|
43
|
</div>
|
44
|
44
|
<div>
|
45
|
45
|
<el-table
|
46
|
|
- :data="tableData"
|
|
46
|
+ :data="list"
|
47
|
47
|
height="500px"
|
48
|
48
|
border
|
49
|
49
|
style="width: 100%"
|
|
@@ -53,17 +53,21 @@
|
53
|
53
|
</el-table-column>
|
54
|
54
|
<el-table-column align="center" prop="name" label="姓名" width="180">
|
55
|
55
|
<template slot-scope="scope">
|
56
|
|
- {{scope.row.patient.name}}
|
|
56
|
+ <!-- {{scope.row.patient.name}} -->
|
|
57
|
+ {{scope.row.patient_name}}
|
57
|
58
|
</template>
|
58
|
59
|
</el-table-column>
|
59
|
60
|
<el-table-column align="center" prop="address" label="透析模式">
|
60
|
61
|
<template slot-scope="scope">
|
61
|
|
- {{scope.row.treatment_mode.name}}
|
|
62
|
+ <!-- {{scope.row.treatment_mode.name}} -->
|
|
63
|
+
|
|
64
|
+ {{scope.row.mode_id}}
|
62
|
65
|
</template>
|
63
|
66
|
</el-table-column>
|
64
|
67
|
<el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
|
65
|
68
|
<template slot-scope="scope">
|
66
|
|
- {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}}
|
|
69
|
+ <!-- {{getCount(scope.row.patient.id,item.id)?getCount(scope.row.patient.id,item.id):""}} -->
|
|
70
|
+ {{scope.row.good_type[index].name}}
|
67
|
71
|
</template>
|
68
|
72
|
</el-table-column>
|
69
|
73
|
<el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
|
|
@@ -171,7 +175,12 @@ export default {
|
171
|
175
|
total:0,
|
172
|
176
|
selecting_schs: [],
|
173
|
177
|
prescriptionList:[],
|
174
|
|
- reduceList:[]
|
|
178
|
+ reduceList:[],
|
|
179
|
+ dialysis_gooods:[],
|
|
180
|
+ allGoodInfo:[],
|
|
181
|
+ list:[],
|
|
182
|
+ new_list:[],
|
|
183
|
+ good_types: [],
|
175
|
184
|
}
|
176
|
185
|
},
|
177
|
186
|
created(){
|
|
@@ -238,6 +247,64 @@ export default {
|
238
|
247
|
this.prescriptionList = prescription
|
239
|
248
|
var reducelist = response.data.data.reducelist
|
240
|
249
|
this.reduceList = reducelist
|
|
250
|
+ var good_type = response.data.data.good_type
|
|
251
|
+ console.log("godd_type",good_type)
|
|
252
|
+ this.tableName = good_type
|
|
253
|
+ this.allGoodInfo = response.data.data.dialysis_goods
|
|
254
|
+ console.log("1111111",response.data.data.dialysis_goods)
|
|
255
|
+ this.list = []
|
|
256
|
+ this.good_types = []
|
|
257
|
+ this.allGoodInfo = []
|
|
258
|
+ this.good_types.push("姓名")
|
|
259
|
+
|
|
260
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
261
|
+ this.good_types.push(response.data.data.good_type[a].type_name)
|
|
262
|
+ }
|
|
263
|
+ for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
|
|
264
|
+ let arr =[]
|
|
265
|
+ // let obj = {
|
|
266
|
+ // id:0,
|
|
267
|
+ // name: response.data.data.dialysis_goods[i].patient.name,
|
|
268
|
+
|
|
269
|
+ // }
|
|
270
|
+ // arr.push(obj)
|
|
271
|
+ // console.log("arr=========",arr)
|
|
272
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
273
|
+ let obj = {
|
|
274
|
+ id:response.data.data.good_type[a].id,
|
|
275
|
+ name:""
|
|
276
|
+
|
|
277
|
+ }
|
|
278
|
+ arr.push(obj)
|
|
279
|
+ }
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+ console.log("2222222",arr)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+ let newObj = {
|
|
286
|
+ "patient_id":response.data.data.dialysis_goods[i].patient_id,
|
|
287
|
+ "patient_name":response.data.data.dialysis_goods[i].patient.name,
|
|
288
|
+ "mode_id":response.data.data.dialysis_goods[i].mode_id,
|
|
289
|
+ "good_type":arr,
|
|
290
|
+ "good_user":response.data.data.dialysis_goods[i].good_user,
|
|
291
|
+ "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
|
|
292
|
+ "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
|
|
293
|
+ "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
|
|
294
|
+ }
|
|
295
|
+
|
|
296
|
+ this.list.push(newObj)
|
|
297
|
+ }
|
|
298
|
+
|
|
299
|
+ for (let a = 0; a < this.list.length; a++){
|
|
300
|
+ for (let b = 0; b < this.list[a].good_type.length; b++){
|
|
301
|
+ if(this.list[a].good_type[b].id > 0){
|
|
302
|
+ this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
|
|
303
|
+ }
|
|
304
|
+
|
|
305
|
+ }
|
|
306
|
+ }
|
|
307
|
+ console.log("list22222",this.list)
|
241
|
308
|
}
|
242
|
309
|
})
|
243
|
310
|
},
|
|
@@ -255,7 +322,7 @@ export default {
|
255
|
322
|
if(response.data.state == 1){
|
256
|
323
|
var material = response.data.data.material
|
257
|
324
|
console.log("material",material)
|
258
|
|
- this.tableName = material
|
|
325
|
+ // this.tableName = material
|
259
|
326
|
}
|
260
|
327
|
})
|
261
|
328
|
},
|
|
@@ -282,6 +349,7 @@ export default {
|
282
|
349
|
page:this.page,
|
283
|
350
|
keyword:this.search_input,
|
284
|
351
|
}
|
|
352
|
+ console.log("params====",params)
|
285
|
353
|
getCollectList(params).then(response=>{
|
286
|
354
|
if(response.data.state == 1){
|
287
|
355
|
var schedule = response.data.data.schedule
|
|
@@ -294,16 +362,75 @@ export default {
|
294
|
362
|
this.prescriptionList = prescription
|
295
|
363
|
var reducelist = response.data.data.reducelist
|
296
|
364
|
this.reduceList = reducelist
|
|
365
|
+ console.log("reducelist",reducelist)
|
|
366
|
+ var good_type = response.data.data.good_type
|
|
367
|
+ console.log("godd_type",good_type)
|
|
368
|
+ this.tableName = good_type
|
|
369
|
+ this.allGoodInfo = response.data.data.dialysis_goods
|
|
370
|
+ console.log("1111111",response.data.data.dialysis_goods)
|
|
371
|
+ this.list = []
|
|
372
|
+ this.good_types = []
|
|
373
|
+ this.allGoodInfo = []
|
|
374
|
+ this.good_types.push("姓名")
|
|
375
|
+
|
|
376
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
377
|
+ this.good_types.push(response.data.data.good_type[a].type_name)
|
|
378
|
+ }
|
|
379
|
+ for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
|
|
380
|
+ let arr =[]
|
|
381
|
+ // let obj = {
|
|
382
|
+ // id:0,
|
|
383
|
+ // name: response.data.data.dialysis_goods[i].patient.name,
|
|
384
|
+
|
|
385
|
+ // }
|
|
386
|
+ // arr.push(obj)
|
|
387
|
+ // console.log("arr=========",arr)
|
|
388
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
389
|
+ let obj = {
|
|
390
|
+ id:response.data.data.good_type[a].id,
|
|
391
|
+ name:""
|
|
392
|
+
|
|
393
|
+ }
|
|
394
|
+ arr.push(obj)
|
|
395
|
+ }
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+ console.log("2222222",arr)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+ let newObj = {
|
|
402
|
+ "patient_id":response.data.data.dialysis_goods[i].patient_id,
|
|
403
|
+ "patient_name":response.data.data.dialysis_goods[i].patient.name,
|
|
404
|
+ "mode_id":response.data.data.dialysis_goods[i].mode_id,
|
|
405
|
+ "good_type":arr,
|
|
406
|
+ "good_user":response.data.data.dialysis_goods[i].good_user,
|
|
407
|
+ "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
|
|
408
|
+ "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
|
|
409
|
+ "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
|
|
410
|
+ }
|
|
411
|
+
|
|
412
|
+ this.list.push(newObj)
|
|
413
|
+ }
|
|
414
|
+
|
|
415
|
+ for (let a = 0; a < this.list.length; a++){
|
|
416
|
+ for (let b = 0; b < this.list[a].good_type.length; b++){
|
|
417
|
+ if(this.list[a].good_type[b].id > 0){
|
|
418
|
+ this.list[a].good_type[b].name = this.getGoodUserInfo(this.list[a].good_type[b].id,this.list[a].good_user,this.list[a].last_good_user)
|
|
419
|
+ }
|
|
420
|
+
|
|
421
|
+ }
|
|
422
|
+ }
|
|
423
|
+ console.log("list22222",this.list)
|
297
|
424
|
}
|
298
|
425
|
})
|
299
|
426
|
},
|
300
|
427
|
getCount(patientid,goodid){
|
301
|
428
|
var count = 0
|
302
|
|
- for(let i=0;i<this.reduceList.length;i++){
|
303
|
|
- if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
|
304
|
|
- count = this.reduceList[i].count
|
305
|
|
- }
|
306
|
|
- }
|
|
429
|
+ // for(let i=0;i<this.reduceList.length;i++){
|
|
430
|
+ // if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
|
|
431
|
+ // count = this.reduceList[i].count
|
|
432
|
+ // }
|
|
433
|
+ // }
|
307
|
434
|
return count
|
308
|
435
|
},
|
309
|
436
|
handleSelectionChange(val){
|
|
@@ -356,7 +483,32 @@ export default {
|
356
|
483
|
}
|
357
|
484
|
}
|
358
|
485
|
return zongliang
|
359
|
|
- }
|
|
486
|
+ },
|
|
487
|
+ getGoodUserInfo(good_type_id,good_user,last_good_user) {
|
|
488
|
+ if (good_user != null && good_user.length > 0) {
|
|
489
|
+ let desc = ""
|
|
490
|
+ for (let b = 0; b < good_user.length; b++){
|
|
491
|
+ if(good_type_id == good_user[b].good_type_id)
|
|
492
|
+ desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
|
|
493
|
+ }
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+ return desc
|
|
497
|
+ } else if (good_user != null && good_user.length <= 0) {
|
|
498
|
+ if (last_good_user != null && last_good_user.length > 0) {
|
|
499
|
+ let desc = ""
|
|
500
|
+ for (let b = 0; b < last_good_user.length; b++){
|
|
501
|
+ if(good_type_id == last_good_user[b].good_type_id)
|
|
502
|
+ desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
|
|
503
|
+ }
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+ return desc
|
|
507
|
+
|
|
508
|
+ }
|
|
509
|
+ return ""
|
|
510
|
+ }
|
|
511
|
+ },
|
360
|
512
|
}
|
361
|
513
|
}
|
362
|
514
|
</script>
|