|
@@ -39,7 +39,10 @@
|
39
|
39
|
<el-container>
|
40
|
40
|
<div style="width:150px">
|
41
|
41
|
<div class="tableTitle">患者列表</div>
|
42
|
|
- <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
|
42
|
+ <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
|
|
43
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
44
|
+ highlight-current-row
|
|
45
|
+ @current-change="handleChange">
|
43
|
46
|
<el-table-column prop="dialysis_no" label="透析号" width="80">
|
44
|
47
|
<template slot-scope="scope">{{scope.row.dialysis_no}}</template>
|
45
|
48
|
</el-table-column>
|
|
@@ -50,7 +53,9 @@
|
50
|
53
|
</div>
|
51
|
54
|
<div style="padding-left:10px;flex:1">
|
52
|
55
|
<div class="tableTitle">统计表</div>
|
53
|
|
- <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
|
|
56
|
+ <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }"
|
|
57
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
58
|
+ >
|
54
|
59
|
<el-table-column fixed prop="name" label="姓名" width="140">
|
55
|
60
|
<!-- <template slot-scope="scope">{{ scope.row.name }}</template> -->
|
56
|
61
|
</el-table-column>
|
|
@@ -91,7 +96,7 @@
|
91
|
96
|
|
92
|
97
|
|
93
|
98
|
<script>
|
94
|
|
- import { getCurrentOrgPatients,getDialysisList } from "@/api/common/common";
|
|
99
|
+ import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById,getPrescriptionByName } from "@/api/common/common";
|
95
|
100
|
import { uParseTime } from "@/utils/tools";
|
96
|
101
|
export default {
|
97
|
102
|
data() {
|
|
@@ -109,6 +114,8 @@ export default {
|
109
|
114
|
DialysisData: [],
|
110
|
115
|
patientsData:[],
|
111
|
116
|
prescriptionList:[],
|
|
117
|
+ limit:1000,
|
|
118
|
+ page:1,
|
112
|
119
|
};
|
113
|
120
|
},
|
114
|
121
|
methods: {
|
|
@@ -126,7 +133,6 @@ export default {
|
126
|
133
|
getCurrentOrgPatients().then(response=>{
|
127
|
134
|
if(response.data.state == 1){
|
128
|
135
|
var patients = response.data.data.patients
|
129
|
|
- console.log("病人列表3",patients)
|
130
|
136
|
this.patientsData = patients
|
131
|
137
|
}
|
132
|
138
|
})
|
|
@@ -221,9 +227,9 @@ export default {
|
221
|
227
|
|
222
|
228
|
|
223
|
229
|
var list = response.data.data.list
|
224
|
|
- console.log("list",list)
|
|
230
|
+ //console.log("list",list)
|
225
|
231
|
var totallist = response.data.data.totallist
|
226
|
|
- console.log("totallist",totallist)
|
|
232
|
+ // console.log("totallist",totallist)
|
227
|
233
|
this.total = totallist
|
228
|
234
|
var prescriptionList = response.data.data.prescriptionList
|
229
|
235
|
for(let i=0;i<prescriptionList.length;i++){
|
|
@@ -255,12 +261,23 @@ export default {
|
255
|
261
|
prescriptionList[i].mode_id = "CRRT"
|
256
|
262
|
}else if(prescriptionList[i].mode_id == 14){
|
257
|
263
|
prescriptionList[i].mode_id = "腹水回输"
|
|
264
|
+ }else if(prescriptionList[i].mode_id == 15){
|
|
265
|
+ prescriptionList[i].mode_id = "HD前置换"
|
|
266
|
+ }
|
|
267
|
+ else if(prescriptionList[i].mode_id == 16){
|
|
268
|
+ prescriptionList[i].mode_id = "HD后置换"
|
|
269
|
+ }
|
|
270
|
+ else if(prescriptionList[i].mode_id == 17){
|
|
271
|
+ prescriptionList[i].mode_id = "HDF前置换"
|
|
272
|
+ }
|
|
273
|
+ else if(prescriptionList[i].mode_id == 18){
|
|
274
|
+ prescriptionList[i].mode_id = "HDF后置换"
|
258
|
275
|
}else if(prescriptionList[i].mode_id == 19){
|
259
|
276
|
prescriptionList[i].mode_id = "IUF+HD"
|
260
|
277
|
}
|
261
|
278
|
}
|
262
|
279
|
|
263
|
|
- console.log("prescriptionList",prescriptionList)
|
|
280
|
+ // console.log("prescriptionList",prescriptionList)
|
264
|
281
|
for(let i=0;i<this.prescriptionList.length;i++){
|
265
|
282
|
for(let j=0;j<list.length;j++){
|
266
|
283
|
if(this.prescriptionList[i].patient_id == list[j].patient_id){
|
|
@@ -284,7 +301,7 @@ export default {
|
284
|
301
|
}
|
285
|
302
|
})
|
286
|
303
|
let list = Object.values(dataInfo)
|
287
|
|
- console.log("arr",list)
|
|
304
|
+ //console.log("arr",list)
|
288
|
305
|
list.map(item => {
|
289
|
306
|
for (let i = 0; i < prescriptionList.length; i++) {
|
290
|
307
|
if (item.patient_id === prescriptionList[i].patient_id) {
|
|
@@ -292,7 +309,7 @@ export default {
|
292
|
309
|
}
|
293
|
310
|
}
|
294
|
311
|
})
|
295
|
|
- console.log("list---",list)
|
|
312
|
+ // console.log("list---",list)
|
296
|
313
|
this.DialysisData = list
|
297
|
314
|
}
|
298
|
315
|
})
|
|
@@ -310,11 +327,31 @@ export default {
|
310
|
327
|
return age;
|
311
|
328
|
}
|
312
|
329
|
},
|
313
|
|
- onSearch(){},
|
|
330
|
+ onSearch(){
|
|
331
|
+ getPrescriptionByName(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
|
|
332
|
+ if(response.data.state === 1){
|
|
333
|
+ var patient = response.data.data.patient
|
|
334
|
+ console.log("patient",patient)
|
|
335
|
+ var total = response.data.data.total
|
|
336
|
+ console.log("total",total)
|
|
337
|
+ }
|
|
338
|
+ })
|
|
339
|
+ },
|
314
|
340
|
unique(arr) {
|
315
|
341
|
const res = new Map();
|
316
|
342
|
return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1));
|
317
|
343
|
},
|
|
344
|
+ handleChange(val){
|
|
345
|
+ getDialysisDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
|
|
346
|
+ if(response.data.state === 1){
|
|
347
|
+ var patients = response.data.data.patients
|
|
348
|
+ console.log("patients",patients)
|
|
349
|
+ var total = response.data.data.total
|
|
350
|
+ console.log("total",total)
|
|
351
|
+ }
|
|
352
|
+ })
|
|
353
|
+
|
|
354
|
+ }
|
318
|
355
|
},
|
319
|
356
|
created(){
|
320
|
357
|
var nowDate = new Date();
|