|
@@ -54,18 +54,23 @@
|
54
|
54
|
<el-table-column fixed prop="name" label="姓名" width="140">
|
55
|
55
|
<!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
|
56
|
56
|
</el-table-column>
|
57
|
|
- <el-table-column prop="age" label="年龄" width="140">
|
58
|
|
- <!-- <template slot-scope="scope">{{ scope.row.id_card_no }}</template> -->
|
|
57
|
+ <el-table-column label="年龄" width="140">
|
|
58
|
+ <template slot-scope="scope">{{ getAge(scope.row.id_card_no) }}</template>
|
59
|
59
|
</el-table-column>
|
60
|
60
|
<el-table-column prop="dialysis_no" label="透析号" width="140">
|
61
|
61
|
<!-- <template slot-scope="scope">{{ scope.row.dialysis_no }}</template> -->
|
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>
|
|
65
|
+ <!--<span>{{ scope.row.mode_id.join("、") }}</span>-->
|
|
66
|
+ <span>{{scope.row.patient_id}}</span>
|
66
|
67
|
</template>
|
67
|
68
|
</el-table-column>
|
68
|
|
- <el-table-column prop="address" label="透析总次数" width="140"></el-table-column>
|
|
69
|
+ <el-table-column prop="address" label="透析总次数" width="140">
|
|
70
|
+ <template slot-scope="scope">
|
|
71
|
+ <span>{{ scope.row.total_dialysis + scope.row.user_sys_before_count }}</span>
|
|
72
|
+ </template>
|
|
73
|
+ </el-table-column>
|
69
|
74
|
</el-table>
|
70
|
75
|
|
71
|
76
|
<el-pagination
|
|
@@ -104,6 +109,7 @@ export default {
|
104
|
109
|
tableData: [],
|
105
|
110
|
DialysisData: [],
|
106
|
111
|
patientsData:[],
|
|
112
|
+ prescriptionList:[],
|
107
|
113
|
};
|
108
|
114
|
},
|
109
|
115
|
methods: {
|
|
@@ -181,7 +187,7 @@ export default {
|
181
|
187
|
if(dialysislist[i].mode_id == 13){
|
182
|
188
|
dialysislist[i].mode_id = "CRRT"
|
183
|
189
|
}
|
184
|
|
- if(dialysislist[i].mode_id == 14){
|
|
190
|
+ if(dialysislist[i].mode_id == 14){
|
185
|
191
|
dialysislist[i].mode_id = "腹水回输"
|
186
|
192
|
}
|
187
|
193
|
if(dialysislist[i].mode_id == 19){
|
|
@@ -199,18 +205,112 @@ export default {
|
199
|
205
|
patient_id: patient_id,
|
200
|
206
|
dialysis_no: item.dialysis_no,
|
201
|
207
|
name:item.name,
|
202
|
|
- age:item.id_card_no
|
|
208
|
+ age:item.id_card_no,
|
|
209
|
+ total_dialysis:item.total_dialysis,
|
|
210
|
+ user_sys_before_count:item.user_sys_before_count,
|
203
|
211
|
})
|
204
|
212
|
});
|
205
|
213
|
res.map(item => {
|
206
|
214
|
item.age = this.getAge(item.age)
|
207
|
215
|
})
|
208
|
216
|
console.log(res)
|
209
|
|
- this.DialysisData = res
|
|
217
|
+ //this.DialysisData = res
|
210
|
218
|
|
211
|
219
|
var total = response.data.data.total
|
212
|
|
- console.log("total",total)
|
213
|
|
- this.total = 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"
|
|
251
|
+ }
|
|
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
|
+ }
|
|
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
|
+ }
|
|
310
|
+ }
|
|
311
|
+ })
|
|
312
|
+ console.log("list---",list)
|
|
313
|
+ this.DialysisData = list
|
214
|
314
|
}
|
215
|
315
|
})
|
216
|
316
|
},
|
|
@@ -227,7 +327,11 @@ export default {
|
227
|
327
|
return age;
|
228
|
328
|
}
|
229
|
329
|
},
|
230
|
|
- onSearch(){}
|
|
330
|
+ onSearch(){},
|
|
331
|
+ unique(arr) {
|
|
332
|
+ const res = new Map();
|
|
333
|
+ return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
|
|
334
|
+ },
|
231
|
335
|
},
|
232
|
336
|
created(){
|
233
|
337
|
var nowDate = new Date();
|