|
@@ -37,13 +37,13 @@
|
37
|
37
|
</div>
|
38
|
38
|
</div>
|
39
|
39
|
<div>
|
40
|
|
- <el-button size="small" icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
|
|
40
|
+ <!-- <el-button size="small" icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button> -->
|
41
|
41
|
<el-button size="small" type="primary" @click="statistics">统计表</el-button>
|
42
|
42
|
</div>
|
43
|
43
|
</div>
|
44
|
44
|
<div>
|
45
|
45
|
<el-table
|
46
|
|
- :data="tableData"
|
|
46
|
+ :data="list"
|
47
|
47
|
border
|
48
|
48
|
style="width: 100%"
|
49
|
49
|
:row-style="{ color: '#303133' }"
|
|
@@ -57,17 +57,37 @@
|
57
|
57
|
</el-table-column>
|
58
|
58
|
<el-table-column align="center" prop="name" label="姓名" width="180">
|
59
|
59
|
<template slot-scope="scope">
|
60
|
|
- {{scope.row.patient.name}}
|
|
60
|
+ <!-- {{scope.row.patient.name}} -->
|
|
61
|
+ {{scope.row.patient_name}}
|
61
|
62
|
</template>
|
62
|
63
|
</el-table-column>
|
63
|
64
|
<el-table-column align="center" prop="address" label="透析模式">
|
64
|
65
|
<template slot-scope="scope">
|
65
|
|
- {{scope.row.treatment_mode.name}}
|
|
66
|
+ <!-- {{scope.row.mode_id}} -->
|
|
67
|
+ <span v-if="scope.row.mode_id == 1">HD</span>
|
|
68
|
+ <span v-if="scope.row.mode_id == 2">HDF</span>
|
|
69
|
+ <span v-if="scope.row.mode_id == 3">HD+HP</span>
|
|
70
|
+ <span v-if="scope.row.mode_id == 4">HP</span>
|
|
71
|
+ <span v-if="scope.row.mode_id == 5">HF</span>
|
|
72
|
+ <span v-if="scope.row.mode_id == 6">SCUF</span>
|
|
73
|
+ <span v-if="scope.row.mode_id == 7">IUF</span>
|
|
74
|
+ <span v-if="scope.row.mode_id == 8">HFHD</span>
|
|
75
|
+ <span v-if="scope.row.mode_id == 9">HFHD+HP</span>
|
|
76
|
+ <span v-if="scope.row.mode_id == 10">PHF</span>
|
|
77
|
+ <span v-if="scope.row.mode_id == 11">HFR</span>
|
|
78
|
+ <span v-if="scope.row.mode_id == 12">HDF+HP</span>
|
|
79
|
+ <span v-if="scope.row.mode_id == 13">CRRT</span>
|
|
80
|
+ <span v-if="scope.row.mode_id == 14">腹水回输</span>
|
|
81
|
+ <span v-if="scope.row.mode_id == 15">HD前置换</span>
|
|
82
|
+ <span v-if="scope.row.mode_id == 16">HD后置换</span>
|
|
83
|
+ <span v-if="scope.row.mode_id == 17">HDF前置换</span>
|
|
84
|
+ <span v-if="scope.row.mode_id == 18"> HDF后置换</span>
|
66
|
85
|
</template>
|
67
|
86
|
</el-table-column>
|
68
|
87
|
<el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
|
69
|
88
|
<template slot-scope="scope">
|
70
|
|
- {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}}
|
|
89
|
+ <!-- {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}} -->
|
|
90
|
+ {{scope.row.good_type[index].name}}
|
71
|
91
|
</template>
|
72
|
92
|
</el-table-column>
|
73
|
93
|
<el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
|
|
@@ -175,7 +195,11 @@ export default {
|
175
|
195
|
total:0,
|
176
|
196
|
selecting_schs: [],
|
177
|
197
|
prescriptionList:[],
|
178
|
|
- reduceList:[]
|
|
198
|
+ reduceList:[],
|
|
199
|
+ allGoodInfo:[],
|
|
200
|
+ list:[],
|
|
201
|
+ new_list:[],
|
|
202
|
+ good_types: [],
|
179
|
203
|
}
|
180
|
204
|
},
|
181
|
205
|
created(){
|
|
@@ -215,7 +239,7 @@ export default {
|
215
|
239
|
this.getlist()
|
216
|
240
|
this.getAllMaterial()
|
217
|
241
|
},
|
218
|
|
- search(){
|
|
242
|
+ search(){
|
219
|
243
|
if(this.selected_date==""){
|
220
|
244
|
this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
|
221
|
245
|
}
|
|
@@ -242,9 +266,68 @@ export default {
|
242
|
266
|
this.prescriptionList = prescription
|
243
|
267
|
var reducelist = response.data.data.reducelist
|
244
|
268
|
this.reduceList = reducelist
|
|
269
|
+ var good_type = response.data.data.good_type
|
|
270
|
+ console.log("godd_type",good_type)
|
|
271
|
+ this.tableName = good_type
|
|
272
|
+ this.allGoodInfo = response.data.data.dialysis_goods
|
|
273
|
+ console.log("1111111",response.data.data.dialysis_goods)
|
|
274
|
+ this.list = []
|
|
275
|
+ this.good_types = []
|
|
276
|
+ this.allGoodInfo = []
|
|
277
|
+ this.good_types.push("姓名")
|
|
278
|
+
|
|
279
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
280
|
+ this.good_types.push(response.data.data.good_type[a].type_name)
|
|
281
|
+ }
|
|
282
|
+ for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
|
|
283
|
+ let arr =[]
|
|
284
|
+ // let obj = {
|
|
285
|
+ // id:0,
|
|
286
|
+ // name: response.data.data.dialysis_goods[i].patient.name,
|
|
287
|
+
|
|
288
|
+ // }
|
|
289
|
+ // arr.push(obj)
|
|
290
|
+ // console.log("arr=========",arr)
|
|
291
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
292
|
+ let obj = {
|
|
293
|
+ id:response.data.data.good_type[a].id,
|
|
294
|
+ name:""
|
|
295
|
+
|
|
296
|
+ }
|
|
297
|
+ arr.push(obj)
|
|
298
|
+ }
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+ console.log("2222222",arr)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+ let newObj = {
|
|
305
|
+ "patient_id":response.data.data.dialysis_goods[i].patient_id,
|
|
306
|
+ "patient_name":response.data.data.dialysis_goods[i].patient.name,
|
|
307
|
+ "mode_id":response.data.data.dialysis_goods[i].mode_id,
|
|
308
|
+ "good_type":arr,
|
|
309
|
+ "good_user":response.data.data.dialysis_goods[i].good_user,
|
|
310
|
+ "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
|
|
311
|
+ "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
|
|
312
|
+ "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
|
|
313
|
+ }
|
|
314
|
+
|
|
315
|
+ this.list.push(newObj)
|
|
316
|
+ }
|
|
317
|
+
|
|
318
|
+ for (let a = 0; a < this.list.length; a++){
|
|
319
|
+ for (let b = 0; b < this.list[a].good_type.length; b++){
|
|
320
|
+ if(this.list[a].good_type[b].id > 0){
|
|
321
|
+ 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)
|
|
322
|
+ }
|
|
323
|
+
|
|
324
|
+ }
|
|
325
|
+ }
|
|
326
|
+ console.log("list22222",this.list)
|
245
|
327
|
}
|
246
|
328
|
})
|
247
|
329
|
},
|
|
330
|
+
|
248
|
331
|
getAllMaterial(){
|
249
|
332
|
if(this.selected_date==""){
|
250
|
333
|
this.start_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
|
|
@@ -258,8 +341,8 @@ export default {
|
258
|
341
|
getAllMaterial(params).then(response=>{
|
259
|
342
|
if(response.data.state == 1){
|
260
|
343
|
var material = response.data.data.material
|
261
|
|
- console.log("material",material)
|
262
|
|
- this.tableName = material
|
|
344
|
+ // console.log("material",material)
|
|
345
|
+ // this.tableName = material
|
263
|
346
|
}
|
264
|
347
|
})
|
265
|
348
|
},
|
|
@@ -298,6 +381,64 @@ export default {
|
298
|
381
|
this.prescriptionList = prescription
|
299
|
382
|
var reducelist = response.data.data.reducelist
|
300
|
383
|
this.reduceList = reducelist
|
|
384
|
+ var good_type = response.data.data.good_type
|
|
385
|
+ console.log("godd_type",good_type)
|
|
386
|
+ this.tableName = good_type
|
|
387
|
+ this.allGoodInfo = response.data.data.dialysis_goods
|
|
388
|
+ console.log("1111111",response.data.data.dialysis_goods)
|
|
389
|
+ this.list = []
|
|
390
|
+ this.good_types = []
|
|
391
|
+ this.allGoodInfo = []
|
|
392
|
+ this.good_types.push("姓名")
|
|
393
|
+
|
|
394
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
395
|
+ this.good_types.push(response.data.data.good_type[a].type_name)
|
|
396
|
+ }
|
|
397
|
+ for(let i = 0; i < response.data.data.dialysis_goods.length; i++){
|
|
398
|
+ let arr =[]
|
|
399
|
+ // let obj = {
|
|
400
|
+ // id:0,
|
|
401
|
+ // name: response.data.data.dialysis_goods[i].patient.name,
|
|
402
|
+
|
|
403
|
+ // }
|
|
404
|
+ // arr.push(obj)
|
|
405
|
+ // console.log("arr=========",arr)
|
|
406
|
+ for (let a = 0; a < response.data.data.good_type.length; a++){
|
|
407
|
+ let obj = {
|
|
408
|
+ id:response.data.data.good_type[a].id,
|
|
409
|
+ name:""
|
|
410
|
+
|
|
411
|
+ }
|
|
412
|
+ arr.push(obj)
|
|
413
|
+ }
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+ console.log("2222222",arr)
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+ let newObj = {
|
|
420
|
+ "patient_id":response.data.data.dialysis_goods[i].patient_id,
|
|
421
|
+ "patient_name":response.data.data.dialysis_goods[i].patient.name,
|
|
422
|
+ "mode_id":response.data.data.dialysis_goods[i].mode_id,
|
|
423
|
+ "good_type":arr,
|
|
424
|
+ "good_user":response.data.data.dialysis_goods[i].good_user,
|
|
425
|
+ "last_good_user":response.data.data.dialysis_goods[i].last_good_user,
|
|
426
|
+ "good_user_detail":response.data.data.dialysis_goods[i].good_user_detail,
|
|
427
|
+ "last_good_user_detail":response.data.data.dialysis_goods[i].last_good_user_detail,
|
|
428
|
+ }
|
|
429
|
+
|
|
430
|
+ this.list.push(newObj)
|
|
431
|
+ }
|
|
432
|
+
|
|
433
|
+ for (let a = 0; a < this.list.length; a++){
|
|
434
|
+ for (let b = 0; b < this.list[a].good_type.length; b++){
|
|
435
|
+ if(this.list[a].good_type[b].id > 0){
|
|
436
|
+ 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)
|
|
437
|
+ }
|
|
438
|
+
|
|
439
|
+ }
|
|
440
|
+ }
|
|
441
|
+ console.log("list22222",this.list)
|
301
|
442
|
}
|
302
|
443
|
})
|
303
|
444
|
},
|
|
@@ -360,7 +501,32 @@ export default {
|
360
|
501
|
}
|
361
|
502
|
}
|
362
|
503
|
return zongliang
|
363
|
|
- }
|
|
504
|
+ },
|
|
505
|
+ getGoodUserInfo(good_type_id,good_user,last_good_user) {
|
|
506
|
+ if (good_user != null && good_user.length > 0) {
|
|
507
|
+ let desc = ""
|
|
508
|
+ for (let b = 0; b < good_user.length; b++){
|
|
509
|
+ if(good_type_id == good_user[b].good_type_id)
|
|
510
|
+ desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
|
|
511
|
+ }
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+ return desc
|
|
515
|
+ } else if (good_user != null && good_user.length <= 0) {
|
|
516
|
+ if (last_good_user != null && last_good_user.length > 0) {
|
|
517
|
+ let desc = ""
|
|
518
|
+ for (let b = 0; b < last_good_user.length; b++){
|
|
519
|
+ if(good_type_id == last_good_user[b].good_type_id)
|
|
520
|
+ desc = desc+ "\n" + last_good_user[b].info.specification_name +"*" +last_good_user[b].count
|
|
521
|
+ }
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+ return desc
|
|
525
|
+
|
|
526
|
+ }
|
|
527
|
+ return ""
|
|
528
|
+ }
|
|
529
|
+ },
|
364
|
530
|
}
|
365
|
531
|
}
|
366
|
532
|
</script>
|